1 #version 130 2 3 /* texture - bias variants */ 4 vec4 texture( sampler1D sampler, float P, float bias); 5 ivec4 texture(isampler1D sampler, float P, float bias); 6 uvec4 texture(usampler1D sampler, float P, float bias); 7 8 vec4 texture( sampler2D sampler, vec2 P, float bias); 9 ivec4 texture(isampler2D sampler, vec2 P, float bias); 10 uvec4 texture(usampler2D sampler, vec2 P, float bias); 11 12 vec4 texture( sampler3D sampler, vec3 P, float bias); 13 ivec4 texture(isampler3D sampler, vec3 P, float bias); 14 uvec4 texture(usampler3D sampler, vec3 P, float bias); 15 16 vec4 texture( samplerCube sampler, vec3 P, float bias); 17 ivec4 texture(isamplerCube sampler, vec3 P, float bias); 18 uvec4 texture(usamplerCube sampler, vec3 P, float bias); 19 20 float texture(sampler1DShadow sampler, vec3 P, float bias); 21 float texture(sampler2DShadow sampler, vec3 P, float bias); 22 float texture(samplerCubeShadow sampler, vec4 P, float bias); 23 24 vec4 texture( sampler1DArray sampler, vec2 P, float bias); 25 ivec4 texture(isampler1DArray sampler, vec2 P, float bias); 26 uvec4 texture(usampler1DArray sampler, vec2 P, float bias); 27 28 vec4 texture( sampler2DArray sampler, vec3 P, float bias); 29 ivec4 texture(isampler2DArray sampler, vec3 P, float bias); 30 uvec4 texture(usampler2DArray sampler, vec3 P, float bias); 31 32 float texture(sampler1DArrayShadow sampler, vec3 P, float bias); 33 34 /* textureProj - bias variants */ 35 vec4 textureProj( sampler1D sampler, vec2 P, float bias); 36 ivec4 textureProj(isampler1D sampler, vec2 P, float bias); 37 uvec4 textureProj(usampler1D sampler, vec2 P, float bias); 38 vec4 textureProj( sampler1D sampler, vec4 P, float bias); 39 ivec4 textureProj(isampler1D sampler, vec4 P, float bias); 40 uvec4 textureProj(usampler1D sampler, vec4 P, float bias); 41 42 vec4 textureProj( sampler2D sampler, vec3 P, float bias); 43 ivec4 textureProj(isampler2D sampler, vec3 P, float bias); 44 uvec4 textureProj(usampler2D sampler, vec3 P, float bias); 45 vec4 textureProj( sampler2D sampler, vec4 P, float bias); 46 ivec4 textureProj(isampler2D sampler, vec4 P, float bias); 47 uvec4 textureProj(usampler2D sampler, vec4 P, float bias); 48 49 vec4 textureProj( sampler3D sampler, vec4 P, float bias); 50 ivec4 textureProj(isampler3D sampler, vec4 P, float bias); 51 uvec4 textureProj(usampler3D sampler, vec4 P, float bias); 52 53 float textureProj(sampler1DShadow sampler, vec4 P, float bias); 54 float textureProj(sampler2DShadow sampler, vec4 P, float bias); 55 56 /* textureOffset - bias variants */ 57 vec4 textureOffset( sampler1D sampler, float P, int offset, float bias); 58 ivec4 textureOffset(isampler1D sampler, float P, int offset, float bias); 59 uvec4 textureOffset(usampler1D sampler, float P, int offset, float bias); 60 61 vec4 textureOffset( sampler2D sampler, vec2 P, ivec2 offset, float bias); 62 ivec4 textureOffset(isampler2D sampler, vec2 P, ivec2 offset, float bias); 63 uvec4 textureOffset(usampler2D sampler, vec2 P, ivec2 offset, float bias); 64 65 vec4 textureOffset( sampler3D sampler, vec3 P, ivec3 offset, float bias); 66 ivec4 textureOffset(isampler3D sampler, vec3 P, ivec3 offset, float bias); 67 uvec4 textureOffset(usampler3D sampler, vec3 P, ivec3 offset, float bias); 68 69 float textureOffset(sampler1DShadow sampler, vec3 P, int offset, float bias); 70 float textureOffset(sampler2DShadow sampler, vec3 P, ivec2 offset, float bias); 71 72 vec4 textureOffset( sampler1DArray sampler, vec2 P, int offset, float bias); 73 ivec4 textureOffset(isampler1DArray sampler, vec2 P, int offset, float bias); 74 uvec4 textureOffset(usampler1DArray sampler, vec2 P, int offset, float bias); 75 76 vec4 textureOffset( sampler2DArray sampler, vec3 P, ivec2 offset, float bias); 77 ivec4 textureOffset(isampler2DArray sampler, vec3 P, ivec2 offset, float bias); 78 uvec4 textureOffset(usampler2DArray sampler, vec3 P, ivec2 offset, float bias); 79 80 float textureOffset(sampler1DArrayShadow samp, vec3 P, int offset, float bias); 81 82 /* textureProjOffsetOffset - bias variants */ 83 vec4 textureProjOffset( sampler1D sampler, vec2 P, int offset, float bias); 84 ivec4 textureProjOffset(isampler1D sampler, vec2 P, int offset, float bias); 85 uvec4 textureProjOffset(usampler1D sampler, vec2 P, int offset, float bias); 86 vec4 textureProjOffset( sampler1D sampler, vec4 P, int offset, float bias); 87 ivec4 textureProjOffset(isampler1D sampler, vec4 P, int offset, float bias); 88 uvec4 textureProjOffset(usampler1D sampler, vec4 P, int offset, float bias); 89 90 vec4 textureProjOffset( sampler2D sampler, vec3 P, ivec2 offset, float bias); 91 ivec4 textureProjOffset(isampler2D sampler, vec3 P, ivec2 offset, float bias); 92 uvec4 textureProjOffset(usampler2D sampler, vec3 P, ivec2 offset, float bias); 93 vec4 textureProjOffset( sampler2D sampler, vec4 P, ivec2 offset, float bias); 94 ivec4 textureProjOffset(isampler2D sampler, vec4 P, ivec2 offset, float bias); 95 uvec4 textureProjOffset(usampler2D sampler, vec4 P, ivec2 offset, float bias); 96 97 vec4 textureProjOffset( sampler3D sampler, vec4 P, ivec3 offset, float bias); 98 ivec4 textureProjOffset(isampler3D sampler, vec4 P, ivec3 offset, float bias); 99 uvec4 textureProjOffset(usampler3D sampler, vec4 P, ivec3 offset, float bias); 100 101 float textureProjOffset(sampler1DShadow s, vec4 P, int offset, float bias); 102 float textureProjOffset(sampler2DShadow s, vec4 P, ivec2 offset, float bias); 103 104 /* 105 * The following texture functions are deprecated: 106 */ 107 vec4 texture1D (sampler1D sampler, float coord, float bias); 108 vec4 texture1DProj (sampler1D sampler, vec2 coord, float bias); 109 vec4 texture1DProj (sampler1D sampler, vec4 coord, float bias); 110 111 vec4 texture2D (sampler2D sampler, vec2 coord, float bias); 112 vec4 texture2DProj (sampler2D sampler, vec3 coord, float bias); 113 vec4 texture2DProj (sampler2D sampler, vec4 coord, float bias); 114 115 vec4 texture3D (sampler3D sampler, vec3 coord, float bias); 116 vec4 texture3DProj (sampler3D sampler, vec4 coord, float bias); 117 118 vec4 textureCube (samplerCube sampler, vec3 coord, float bias); 119 120 vec4 shadow1D (sampler1DShadow sampler, vec3 coord, float bias); 121 vec4 shadow2D (sampler2DShadow sampler, vec3 coord, float bias); 122 vec4 shadow1DProj (sampler1DShadow sampler, vec4 coord, float bias); 123 vec4 shadow2DProj (sampler2DShadow sampler, vec4 coord, float bias); 124 125 /* 126 * 8.8 - Fragment Processing Functions 127 */ 128 float dFdx(float p); 129 vec2 dFdx(vec2 p); 130 vec3 dFdx(vec3 p); 131 vec4 dFdx(vec4 p); 132 133 float dFdy(float p); 134 vec2 dFdy(vec2 p); 135 vec3 dFdy(vec3 p); 136 vec4 dFdy(vec4 p); 137 138 float fwidth(float p); 139 vec2 fwidth(vec2 p); 140 vec3 fwidth(vec3 p); 141 vec4 fwidth(vec4 p); 142