Hi,

I'm facing the same problem, and I can't pre-compute vertex attributes on CPU 
because my vertex are moved by the shader him-self (displacement mapping).

I've tried to use double matrices, but these leads to a lot of compatibility 
problem.

Since the precision problem is in the "temporary computation" and not in the 
final result (result values are small and fit well in a 32 bits float) I 
precompute (on CPU) lot of values in a 2048 (or 4096) pixels wide Texture1D.

In the shader I have only to read in this look-up-table. There are some 
limitations (linear sampling, max input value in look up table...) but for my 
problem, it works very well.

Cheers,
Aurelien

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=57581#57581





_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to