diff options
author | Brian Paul <brianp@vmware.com> | 2009-12-14 15:38:18 -0700 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2009-12-14 15:38:18 -0700 |
commit | a213819dbb76ac882fe127f96509442a233079d4 (patch) | |
tree | 5f8f9495819ac745134a387caa029f9a8e2f0670 | |
parent | 98cde374069f1266ce3f14265b1252ac3c56559e (diff) |
glsl1: added exp2(), log(), log2() tests
-rw-r--r-- | src/glean/tglsl1.cpp | 41 |
1 files changed, 40 insertions, 1 deletions
diff --git a/src/glean/tglsl1.cpp b/src/glean/tglsl1.cpp index d395459..1f2f73c 100644 --- a/src/glean/tglsl1.cpp +++ b/src/glean/tglsl1.cpp @@ -787,7 +787,7 @@ static const ShaderProgram Programs[] = { }, { - "exp(vec4) function", + "exp(vec4) function", // base e NO_VERTEX_SHADER, "uniform vec4 uniform1; \n" "void main() { \n" @@ -800,6 +800,45 @@ static const ShaderProgram Programs[] = { }, { + "exp2(vec4) function", // base 2 + NO_VERTEX_SHADER, + "uniform vec4 uniform1; \n" + "void main() { \n" + " vec4 u = vec4(1.0, 2.5, -0.5, 2.0); \n" + " gl_FragColor = exp2(u) * 0.1; \n" + "} \n", + { 0.2, 0.5657, 0.0707, 0.4 }, + DONT_CARE_Z, + FLAG_NONE + }, + + { + "log(vec4) function", // natural log + NO_VERTEX_SHADER, + "uniform vec4 uniform1; \n" + "void main() { \n" + " vec4 u = vec4(1.0, 10.0, 500.0, 1000.0); \n" + " gl_FragColor = log(u) * 0.1; \n" + "} \n", + { 0.0, 0.2314, 0.6215, 0.6908 }, + DONT_CARE_Z, + FLAG_NONE + }, + + { + "log2(vec4) function", // log base 2 + NO_VERTEX_SHADER, + "uniform vec4 uniform1; \n" + "void main() { \n" + " vec4 u = vec4(1.0, 10.0, 500.0, 1000.0); \n" + " gl_FragColor = log2(u) * 0.1; \n" + "} \n", + { 0.0, 0.3322, 0.8966, 0.9966 }, + DONT_CARE_Z, + FLAG_NONE + }, + + { "length() functions", NO_VERTEX_SHADER, "void main() { \n" |