View Full Version : GLSL texture2D with derivatives

04-21-2006, 02:15 PM
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?

04-21-2006, 07:00 PM
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.