GLSL texture2DGrad and texture2D
Hi. Because of manual tiling in a fragment shader, I need to supply texture coordinate derivatives myself to avoid mipmapping artifacts at the texture borders, as you can see here.
I first tried texture2DLod, but that doesn't support anisotropic filtering. texture2DGrad does (according to the GLSL and g80 specs) but I am having a hard time replicating the AF quality (or even getting AF at all) I get with a normal texture2D call.
My question is, shouldn't these two calls (below) give the same results. If not, what am I doing wrong? If so, is there any other reason these two lines would have different outcomes?
texture2D(sampler, tc);
texture2DGrad(sampler, tc, dFdx(tc.x), dFdy(tc.y));
Thanks!
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement