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
Last modified date: May 29, 2015
Revision: 6
WebGL extension #27
Written against the WebGL API 1.0 specification.
Promoted to core and no longer available as an extension in WebGL API 2.0 specification. Requires GLSL #version 300 es.
This extension exposes the EXT_shader_texture_lod functionality to WebGL.
There are no WebGL-specific behavioral changes.
Consult the above extension for documentation, issues and new functions and enumerants.
When this extension is enabled:
GL_EXT_shader_texture_lod
with an #extension
directive:vec4 texture2DLodEXT(sampler2D sampler, vec2 coord, float lod)
is a built-in
function.
vec4 texture2DProjLodEXT(sampler2D sampler, vec3 coord, float lod)
is a built-in
function.
vec4 texture2DProjLodEXT(sampler2D sampler, vec4 coord, float lod)
is a built-in
function.
vec4 textureCubeLodEXT(samplerCube sampler, vec3 coord, float lod)
is a built-in
function.
vec4 texture2DGradEXT(sampler2D sampler, vec2 P, vec2 dPdx, vec2 dPdy)
is a built-in
function.
vec4 texture2DProjGradEXT(sampler2D sampler, vec3 P, vec2 dPdx, vec2 dPdy)
is a built-in
function.
vec4 texture2DProjGradEXT(sampler2D sampler, vec4 P, vec2 dPdx, vec2 dPdy)
is a built-in
function.
vec4 textureCubeGradEXT(samplerCube sampler, vec3 P, vec3 dPdx, vec3 dPdy)
is a built-in
function.
GL_EXT_shader_texture_lod
is defined as 1
.
[Exposed=(Window,Worker), LegacyNoInterfaceObject] 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)); }
Revision 1, 2014/02/10
Revision 2, 2014/02/18
Revision 3, 2014/06/27
Revision 4, 2014/07/15
Revision 5, 2014/11/07
Revision 6, 2015/05/29