EXT_shader_texture_lod WebGL working group (public_webgl 'at' khronos.org) Vladimir Vukicevic (vladimir 'at' mozilla.com) Florian Boesch (pyalot 'at' gmail.com) Members of the WebGL working group 27 This extension adds additional texture functions to the OpenGL ES Shading Language which provide the shader writer with explicit control of LOD. [NoInterfaceObject] interface EXT_shader_texture_lod { };
    #extension GL_EXT_shader_texture_lod : enable
    #extension GL_OES_standard_derivatives : enable

    uniform sampler2D myTexture;
    varying vec2 texcoord;

    void main(){
        // avoids artifacts when wrapping texture coordinates
        gl_FragColor = texture2DGradEXT(myTexture, mod(texcoord, vec2(0.1, 0.5)), dFdx(texcoord), dFdy(texcoord));
    }
    
Initial revision. Moved to draft. Moved to community approved after discussion on public_webgl list. Added NoInterfaceObject extended attribute. Corrected extension name to include GL_ prefix. Ratified by Khronos Board of Promoters.