diff options
author | Kenneth Graunke <[email protected]> | 2010-10-18 15:35:10 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2011-05-09 11:23:54 -0700 |
commit | 5a3a242a8fc4b9f0cac0e40786dd0c4831517473 (patch) | |
tree | bbe0a5db4be397ee0b26aaf85a1beaa3ea6cc551 /src/glsl/builtins/profiles | |
parent | 1d4eb8d5d82fca2bc6689cff90a8b971feac8054 (diff) |
glsl: Add compiler support for ARB_shader_texture_lod.
Signed-off-by: Kenneth Graunke <[email protected]>
Tested-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/glsl/builtins/profiles')
-rw-r--r-- | src/glsl/builtins/profiles/ARB_shader_texture_lod.frag | 64 | ||||
-rw-r--r-- | src/glsl/builtins/profiles/ARB_shader_texture_lod.vert | 46 |
2 files changed, 110 insertions, 0 deletions
diff --git a/src/glsl/builtins/profiles/ARB_shader_texture_lod.frag b/src/glsl/builtins/profiles/ARB_shader_texture_lod.frag new file mode 100644 index 00000000000..c15e2a10a5b --- /dev/null +++ b/src/glsl/builtins/profiles/ARB_shader_texture_lod.frag @@ -0,0 +1,64 @@ +/* + * The existing isotropic vertex texture functions are added to the + * built-in functions for fragment shaders. + */ +vec4 texture1DLod (sampler1D sampler, float coord, float lod); +vec4 texture1DProjLod(sampler1D sampler, vec2 coord, float lod); +vec4 texture1DProjLod(sampler1D sampler, vec4 coord, float lod); +vec4 texture2DLod (sampler2D sampler, vec2 coord, float lod); +vec4 texture2DProjLod(sampler2D sampler, vec3 coord, float lod); +vec4 texture2DProjLod(sampler2D sampler, vec4 coord, float lod); +vec4 texture3DLod (sampler3D sampler, vec3 coord, float lod); +vec4 texture3DProjLod(sampler3D sampler, vec4 coord, float lod); +vec4 textureCubeLod (samplerCube sampler, vec3 coord, float lod); +vec4 shadow1DLod (sampler1DShadow sampler, vec3 coord, float lod); +vec4 shadow2DLod (sampler2DShadow sampler, vec3 coord, float lod); +vec4 shadow1DProjLod(sampler1DShadow sampler, vec4 coord, float lod); +vec4 shadow2DProjLod(sampler2DShadow sampler, vec4 coord, float lod); + +/* New anisotropic texture functions, providing explicit derivatives: */ +vec4 texture1DGradARB (sampler1D sampler, + float P, float dPdx, float dPdy); +vec4 texture1DProjGradARB (sampler1D sampler, + vec2 P, float dPdx, float dPdy); +vec4 texture1DProjGradARB (sampler1D sampler, + vec4 P, float dPdx, float dPdy); + +vec4 texture2DGradARB (sampler2D sampler, + vec2 P, vec2 dPdx, vec2 dPdy); +vec4 texture2DProjGradARB (sampler2D sampler, + vec3 P, vec2 dPdx, vec2 dPdy); +vec4 texture2DProjGradARB (sampler2D sampler, + vec4 P, vec2 dPdx, vec2 dPdy); + +vec4 texture3DGradARB (sampler3D sampler, + vec3 P, vec3 dPdx, vec3 dPdy); +vec4 texture3DProjGradARB (sampler3D sampler, + vec4 P, vec3 dPdx, vec3 dPdy); + +vec4 textureCubeGradARB (samplerCube sampler, + vec3 P, vec3 dPdx, vec3 dPdy); + +vec4 shadow1DGradARB (sampler1DShadow sampler, + vec3 P, float dPdx, float dPdy); +vec4 shadow1DProjGradARB (sampler1DShadow sampler, + vec4 P, float dPdx, float dPdy); + +vec4 shadow2DGradARB (sampler2DShadow sampler, + vec3 P, vec2 dPdx, vec2 dPdy); +vec4 shadow2DProjGradARB (sampler2DShadow sampler, + vec4 P, vec2 dPdx, vec2 dPdy); + +#ifdef GL_ARB_texture_rectangle +vec4 texture2DRectGradARB (sampler2DRect sampler, + vec2 P, vec2 dPdx, vec2 dPdy); +vec4 texture2DRectProjGradARB(sampler2DRect sampler, + vec3 P, vec2 dPdx, vec2 dPdy); +vec4 texture2DRectProjGradARB(sampler2DRect sampler, + vec4 P, vec2 dPdx, vec2 dPdy); + +vec4 shadow2DRectGradARB (sampler2DRectShadow sampler, + vec3 P, vec2 dPdx, vec2 dPdy); +vec4 shadow2DRectProjGradARB (sampler2DRectShadow sampler, + vec4 P, vec2 dPdx, vec2 dPdy); +#endif diff --git a/src/glsl/builtins/profiles/ARB_shader_texture_lod.vert b/src/glsl/builtins/profiles/ARB_shader_texture_lod.vert new file mode 100644 index 00000000000..edfed26fc98 --- /dev/null +++ b/src/glsl/builtins/profiles/ARB_shader_texture_lod.vert @@ -0,0 +1,46 @@ +/* New anisotropic texture functions, providing explicit derivatives: */ +vec4 texture1DGradARB (sampler1D sampler, + float P, float dPdx, float dPdy); +vec4 texture1DProjGradARB (sampler1D sampler, + vec2 P, float dPdx, float dPdy); +vec4 texture1DProjGradARB (sampler1D sampler, + vec4 P, float dPdx, float dPdy); + +vec4 texture2DGradARB (sampler2D sampler, + vec2 P, vec2 dPdx, vec2 dPdy); +vec4 texture2DProjGradARB (sampler2D sampler, + vec3 P, vec2 dPdx, vec2 dPdy); +vec4 texture2DProjGradARB (sampler2D sampler, + vec4 P, vec2 dPdx, vec2 dPdy); + +vec4 texture3DGradARB (sampler3D sampler, + vec3 P, vec3 dPdx, vec3 dPdy); +vec4 texture3DProjGradARB (sampler3D sampler, + vec4 P, vec3 dPdx, vec3 dPdy); + +vec4 textureCubeGradARB (samplerCube sampler, + vec3 P, vec3 dPdx, vec3 dPdy); + +vec4 shadow1DGradARB (sampler1DShadow sampler, + vec3 P, float dPdx, float dPdy); +vec4 shadow1DProjGradARB (sampler1DShadow sampler, + vec4 P, float dPdx, float dPdy); + +vec4 shadow2DGradARB (sampler2DShadow sampler, + vec3 P, vec2 dPdx, vec2 dPdy); +vec4 shadow2DProjGradARB (sampler2DShadow sampler, + vec4 P, vec2 dPdx, vec2 dPdy); + +#ifdef GL_ARB_texture_rectangle +vec4 texture2DRectGradARB (sampler2DRect sampler, + vec2 P, vec2 dPdx, vec2 dPdy); +vec4 texture2DRectProjGradARB(sampler2DRect sampler, + vec3 P, vec2 dPdx, vec2 dPdy); +vec4 texture2DRectProjGradARB(sampler2DRect sampler, + vec4 P, vec2 dPdx, vec2 dPdy); + +vec4 shadow2DRectGradARB (sampler2DRectShadow sampler, + vec3 P, vec2 dPdx, vec2 dPdy); +vec4 shadow2DRectProjGradARB (sampler2DRectShadow sampler, + vec4 P, vec2 dPdx, vec2 dPdy); +#endif |