GLSL texture2D with derivatives

What is the GLSL equivalent of the Cg texture lookup with derivative function tex2D(sampler2D tex, float2 s, float2 dsdx, float2 dsdy)?

Is there such a thing in GLSL?

In standard GLSL there’s no such function, but on ATI you can use the GL_ATI_shader_texture_lod extension that adds a texture2D_ATI(sampler, coord, dx, dy) function among other things.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.