[osg-users] Minor shader bugs

Filip Wänström filip.wanstrom at tii.se
Tue Sep 16 00:59:19 PDT 2008


Hi,

I believe that I have found a minor bug in the shader code in osgmovie.

vec4 texture_color = textureRect(movie_texture, gl_TexCoord[0]);

should be

vec4 texture_color = textureRect(movie_texture, gl_TexCoord[0].st);

(or similar.. using vec2 instead of vec4 for texcoords)

Since the specs doesn't support vec4 as input for the texcoords on texture2D
I assume it shouldn't allow it on the textureRect extension either. My
experience tells me that windows nvidia drivers for example lets things like
this pass by coercion.

On the other hand textureRect and texture2DRect is not really part of the
glsl spec so....

It is not a major issue of course, but on a mac for example, it will not
execute correctly without this change. I have tried to find similar issues
elsewhere in the code but happily enough I could not find any.

I propose this is changed.

/Filip
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20080916/1fadacfc/attachment-0002.htm>


More information about the osg-users mailing list