Umit, It's a well known gotcha with texture repeats.
Each vertex has increasing causticsCoord.x. Imagine the vertices with coord 0.0, 0.1, 0.2, 0.3 etc. The fragments in between any of these coords have _interpolated_ texcoords i.e. a fragment halfway betwen 0.0 and 0.1 vertex has a texcoord of 0.05. For the end vertices, you have 0.8,0.9,1.0, 1.1. The fract function turns this into 0.8, 0.9, 0.0, 0.1 Hence a fragment half way between 0.9 and 1.0 interpolates the texcoord between 0.9 and 0.0, giving 0.45, not 0.95 as you would want. Between 0.9 and "1.0", then the actual texcoord used decreases rapidly from 0.9 to 0.0. The artifact you see is all of your caustics texture, mirrored, and shoved into the last vertex gap. To get rid if it, try losing the "fract" instruction. There may also be dependencies on your texture mode (REPEAT, MIRROR, CLAMP) that you might need to play with depending on what your texture looks like. Hope that helps, David
_______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org