[Piglit] [PATCH] glsl-fs-shadow2D-clamp-z: test clamping of Z in shadow2D
Brian Paul
brianp at vmware.com
Mon Sep 24 07:41:39 PDT 2012
On 09/24/2012 08:29 AM, Marek Olšák wrote:
> ---
> .../samplers/glsl-fs-shadow2D-clamp-z.shader_test | 30 ++++++++++++++++++++
> 1 file changed, 30 insertions(+)
> create mode 100644 tests/spec/glsl-1.10/execution/samplers/glsl-fs-shadow2D-clamp-z.shader_test
>
> diff --git a/tests/spec/glsl-1.10/execution/samplers/glsl-fs-shadow2D-clamp-z.shader_test b/tests/spec/glsl-1.10/execution/samplers/glsl-fs-shadow2D-clamp-z.shader_test
> new file mode 100644
> index 0000000..01c91bc
> --- /dev/null
> +++ b/tests/spec/glsl-1.10/execution/samplers/glsl-fs-shadow2D-clamp-z.shader_test
> @@ -0,0 +1,30 @@
> +# Test that the Z texture coordinate is clamped to [0,1] prior to the comparison.
> +
> +[require]
> +GLSL>= 1.10
> +
> +[vertex shader file]
> +glsl-fs-shadow.vert
> +
> +[fragment shader]
> +uniform vec3 texcoords;
> +uniform sampler2DShadow tex;
> +
> +void main()
> +{
> + gl_FragColor = shadow2D(tex, texcoords.xyz);
> +}
> +
> +[test]
> +uniform int tex 0
> +texture shadow2D 0 (32, 32)
> +texparameter 2D compare_func equal
> +
> +uniform vec3 texcoords 0 0 -1
> +draw rect -1 -1 1 2
> +
> +uniform vec3 texcoords 1 0 2
> +draw rect 0 -1 1 2
> +
> +relative probe rgba (0.25, 0) (1.0, 1.0, 1.0, 1.0)
> +relative probe rgba (0.75, 0) (1.0, 1.0, 1.0, 1.0)
Reviewed-by: Brian Paul <brianp at vmware.com>
More information about the Piglit
mailing list