aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/shader/slang/library/slang_vertex_builtin.gc
diff options
context:
space:
mode:
authorMichal Krol <[email protected]>2006-02-21 12:35:06 +0000
committerMichal Krol <[email protected]>2006-02-21 12:35:06 +0000
commitcc1591667d55a6dbfafbd3d6a7afa9f9288c625d (patch)
treea3ef92d3a8667e830c94db9441089dbadb45e31a /src/mesa/shader/slang/library/slang_vertex_builtin.gc
parent8986e36f368d11bcf3f1938d77b5df69aa2ee11b (diff)
More GLSL code:
- uniforms (only GetLocation, Uniform1f and Uniform4fv for now for demos); - fix bugs and optimize array size handling; - 2D texture sampling (needs Enable(TEXTURE_2D) to work); - decrease built-in library assembly size by 30%.
Diffstat (limited to 'src/mesa/shader/slang/library/slang_vertex_builtin.gc')
-rwxr-xr-xsrc/mesa/shader/slang/library/slang_vertex_builtin.gc40
1 files changed, 11 insertions, 29 deletions
diff --git a/src/mesa/shader/slang/library/slang_vertex_builtin.gc b/src/mesa/shader/slang/library/slang_vertex_builtin.gc
index ae3e071a2ea..2b5953a0323 100755
--- a/src/mesa/shader/slang/library/slang_vertex_builtin.gc
+++ b/src/mesa/shader/slang/library/slang_vertex_builtin.gc
@@ -48,7 +48,7 @@ vec4 ftransform () {
//
vec4 texture1DLod (sampler1D sampler, float coord, float lod) {
- // XXX:
+ // XXX:
return vec4 (0.0);
}
@@ -61,64 +61,46 @@ vec4 texture1DProjLod (sampler1D sampler, vec4 coord, float lod) {
}
vec4 texture2DLod (sampler2D sampler, vec2 coord, float lod) {
- // XXX:
+ // XXX:
return vec4 (0.0);
}
vec4 texture2DProjLod (sampler2D sampler, vec3 coord, float lod) {
- vec2 u;
- u.s = coord.s / coord.p;
- u.t = coord.t / coord.p;
- return texture2DLod (sampler, u, lod);
+ return texture2DLod (sampler, vec2 (coord.s / coord.p, coord.t / coord.p), lod);
}
vec4 texture2DProjLod (sampler2D sampler, vec4 coord, float lod) {
- vec2 u;
- u.s = coord.s / coord.q;
- u.t = coord.t / coord.q;
- return texture2DLod (sampler, u, lod);
+ return texture2DLod (sampler, vec2 (coord.s / coord.q, coord.t / coord.q), lod);
}
vec4 texture3DLod (sampler3D sampler, vec3 coord, float lod) {
- // XXX:
+ // XXX:
return vec4 (0.0);
}
vec4 texture3DProjLod (sampler3D sampler, vec4 coord, float lod) {
- vec3 u;
- u.s = coord.s / coord.q;
- u.t = coord.t / coord.q;
- u.p = coord.p / coord.q;
- return texture3DLod (sampler, u, lod);
+ return texture3DLod (sampler, vec3 (coord.s / coord.q, coord.t / coord.q, coord.p / coord.q), lod);
}
vec4 textureCubeLod (samplerCube sampler, vec3 coord, float lod) {
- // XXX:
+ // XXX:
return vec4 (0.0);
}
vec4 shadow1DLod (sampler1DShadow sampler, vec3 coord, float lod) {
- // XXX:
+ // XXX:
return vec4 (0.0);
}
vec4 shadow2DLod (sampler2DShadow sampler, vec3 coord, float lod) {
- // XXX:
+ // XXX:
return vec4 (0.0);
}
vec4 shadow1DProjLod (sampler1DShadow sampler, vec4 coord, float lod) {
- vec3 u;
- u.s = coord.s / coord.q;
- u.t = 0.0;
- u.p = coord.p / coord.q;
- return shadow1DLod (sampler, u, lod);
+ return shadow1DLod (sampler, vec3 (coord.s / coord.q, 0.0, coord.p / coord.q), lod);
}
vec4 shadow2DProjLod (sampler2DShadow sampler, vec4 coord, float lod) {
- vec3 u;
- u.s = coord.s / coord.q;
- u.t = coord.t / coord.q;
- u.p = coord.p / coord.q;
- return shadow2DLod (sampler, u, lod);
+ return shadow2DLod (sampler, vec3 (coord.s / coord.q, coord.t / coord.q, coord.p / coord.q), lod);
}