rendergather / osgocean

Automatically exported from code.google.com/p/osgocean
GNU Lesser General Public License v3.0
0 stars 0 forks source link

Endless ocean not so endless #26

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
When fog isn't set to extreme values and one is flying rather high (yea
well, doing a flight simulation here :-) as in the example the end of the
endless ocean is easily visible so I added some (static) quads around the
dynamic tiles in FFTOceanSurface.

If wanted I'll provide a patch as soon as I have cleaned the code up a little.

Original issue reported on code.google.com by felix.nawothnig on 31 Mar 2010 at 9:12

GoogleCodeExporter commented 9 years ago
Hi Felix,

Yes I would be interested in seeing these changes. Presumably these static 
quads can 
are configurable?

Cheers,

Kim

Original comment by kcb...@googlemail.com on 24 May 2010 at 7:24

GoogleCodeExporter commented 9 years ago
Well, let's talk fantasy first:

You should be able to say the ocean extends by X from the center, completely
independent off the tile size, resolution, current mipmaping, etc.

This defines one huge quad containing the ocean - and that's all the 
configuration
one should need.

osgOcean should put planar geometry with the water shader on it (you could 
probably
heavily optimize this but it's not a bottleneck at my app) everywhere where is 
no
tile. Obviously there is some geometry tearing at the borders but as they are 
really
far away - not noticeable.

I suppose it should recalculate a huge tri-strip surrounding all tiles everytime
tiling changes...

And now back to reality:

I still haven't got the time around to do this properly... I actually do one 
giant
quad, ensure that it's rendered first with depth writes disabled and have some 
nasty
hacks in my render loop to avoid artifacts which still popped up from time to 
time
(don't know exactly why, the write-first-no-depth should have worked... but 
still,
it's a gross hack)...

I really need some time to dig into FFTOceanSurface and understand all that 
tiling
code...

Original comment by felix.nawothnig on 24 May 2010 at 9:51