diff options
author | Brian Paul <brianp@vmware.com> | 2009-09-29 16:45:05 -0600 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2009-09-29 16:45:05 -0600 |
commit | 7e96ca56e7177f80ac522a5ba20c17901bfd4a08 (patch) | |
tree | 8c01c2c0fe7fe24ef02bc7468289c48f69fcb652 | |
parent | 9417e9534006dd5d94dcf619e599f6315c23da66 (diff) |
glsl1: added sqrt(vec4) test
-rw-r--r-- | src/glean/tglsl1.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/glean/tglsl1.cpp b/src/glean/tglsl1.cpp index 79ac78e..8169533 100644 --- a/src/glean/tglsl1.cpp +++ b/src/glean/tglsl1.cpp @@ -606,6 +606,23 @@ static const ShaderProgram Programs[] = { }, { + // This test is interesting for sqrt(0) which may be + // implemented as 1/rsqrt(x) which would generate Inf values + "sqrt(vec4) function", + NO_VERTEX_SHADER, + "uniform vec4 uniform1; \n" + "void main() { \n" + " vec4 u = vec4(0.0, 0.09, 0.25, 1.0); \n" + " u = u * uniform1.xxxx; // mul by 1.0 \n" + " u = sqrt(u); \n" + " gl_FragColor = u; \n" + "} \n", + { 0.0, 0.3, 0.5, 1.0 }, + DONT_CARE_Z, + FLAG_NONE + }, + + { "clamp() function", NO_VERTEX_SHADER, "uniform vec4 uniform1; \n" |