diff options
author | Ian Romanick <ian.d.romanick@intel.com> | 2010-08-30 10:28:02 -0700 |
---|---|---|
committer | Ian Romanick <ian.d.romanick@intel.com> | 2010-08-30 10:28:02 -0700 |
commit | c8fb994ba84778d0919a5ef14682e7b47eae1480 (patch) | |
tree | 66b5e21774dfba11b07f7a1e5a0163f476c28213 /tests/shaders/glsl-fs-tan-2.shader_test | |
parent | 64920c46ab558dea3bd28406c380b5580d72a92c (diff) |
Modify tangent tests to accept values calculated in single precission
Diffstat (limited to 'tests/shaders/glsl-fs-tan-2.shader_test')
-rw-r--r-- | tests/shaders/glsl-fs-tan-2.shader_test | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/shaders/glsl-fs-tan-2.shader_test b/tests/shaders/glsl-fs-tan-2.shader_test index 76e33928a..e32b10ca9 100644 --- a/tests/shaders/glsl-fs-tan-2.shader_test +++ b/tests/shaders/glsl-fs-tan-2.shader_test @@ -20,15 +20,16 @@ void main() float retVal = tan(x); // expected result, calculated by C program - const float expVal = 1255.765592; const float tolerance = 0.001; + const vec2 expVal = vec2(1255.765592 - tolerance, + 1255.848311 + tolerance); // Top half of the window should be 0.5 gray, and the bottom half // should be green. if (y > 0.0) - gl_FragColor = vec4(vec3(retVal / (2.0 * expVal)), 1.0); + gl_FragColor = vec4(vec2(retVal / (2.0 * expVal)).xyy, 1.0); else - gl_FragColor = (abs(retVal - expVal) <= tolerance) + gl_FragColor = ((retVal >= expVal.x) && (retVal <= expVal.y)) ? vec4(0.0, 1.0, 0.0, 1.0) // green : vec4(1.0, 0.0, 0.0, 1.0); // red } |