View Full Version : clamping a 3d texture

09-19-2002, 02:16 AM

here you can find a screenshot of my first attempt of 3d stroke texture : http://arath.free.fr/projets/space_banana_2/stroke_3d_texture.jpg

As you can see I still got a problem on the right of the texture, there is a gradation. For information, my texture is a 256x256x8 3d texture, with mipmapping calculating by hand, the depth is used to represent shading when the third parameter texture coordinate (w) is set to 0.0f the texture is totaly black and 1.0f is white (on the right on the screenshot). I try to use GL_REPEAT but the effect was worse, I also check the box in the control panel "enable conformant OpenGL texture clamp behavior" (since I've got a nvidia card) but in vain. Did I forget something? Please help me!


09-19-2002, 02:37 AM
Are you using CLAMP_TO_EDGE for texture clamping? Otherwise you'll see samples from the border color.

09-19-2002, 03:04 AM
Thanks, a bug was in my code (since I was using the GL_CLAMP_TO_EDGE token). It works fine now.