Pad the outside of the water region with 2-3 blocks all the way around. Cheap, and easy.
Yes maybe a bit too cheap
I will do that if a have no better solution thanks.
I actually had the exact same issue.
You are only rendering those water patches which are given in the bitfields, right?
I made numerous changes to the condition (OR'ed it with checks for the value of the heightmap at that position is non-0.0f, inserted the global water height value at heightmap values which were 0.0f, where the bitfields actually said to be a water patch and such stuff), but ended up with some little islands in the water (see my thread.. hope the pictures are still up), which were obviously glitches in the MH2O and nothing predictable.
I mailed Schlumpf for his solution in NoggIt, but he didn't know either how to solve that. That's why I fell back to simply reading the global water height or something like that... I may post some code if you want so.
Yes, the one given in the header. There is also a mask in the informations block I didn't tried however.
It won't be necessary, thanks. I just wanted to know if there is a proper way to do it.
Now I wonder if it's worth to keep the heightmap if I have to fall back on an approximative rendering...
I think I will just take the global water height, unless I find a tile where the difference real height/rendered height is too important.
Thanks to both of you.