View Full Version : offset texture 2d problems

11-06-2002, 05:40 PM

I'm using the NVIDIA texture shader program offset_texture_2d, and am getting some pixelation artifacts (or maybe it's more accurate to say texelation artifacts). It's as if the DSDT texture is not getting linearly interpolated even though I'm setting GL_TEXTURE_MIN/MAG_FILTER to GL_LINEAR (not using mipmaps). In fact, if I change GL_LINEAR to GL_NEAREST, I get the exact same results.

Also, I do not set the filters to GL_NEAREST -anywhere- in the code.


11-10-2002, 10:11 PM
Solved the problem. If anyone's interested, it was caused by insufficient precision in the DS/DT texture. Since it is byte-precise and my offsets are rather small in differences, I was getting an image which -looked- like it was GL_NEAREST-filtered. Problem was solved by finding the maximum offset value, scaling up the offsets to [-1, 1], then scaling down by using the texture offset matrix.

Ok, time to sweep the floor off all the hair I pulled out in frustration for the past few days =)