mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
tests: Add a shader test for texture sampling.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com> Signed-off-by: Matteo Bruni <mbruni@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
committed by
Alexandre Julliard
parent
9c645bb1f6
commit
3ca8f52b0b
34
tests/sampler.shader_test
Normal file
34
tests/sampler.shader_test
Normal file
@@ -0,0 +1,34 @@
|
||||
[sampler 0]
|
||||
filter linear linear linear
|
||||
address clamp clamp clamp
|
||||
|
||||
[texture 0]
|
||||
size (2, 2)
|
||||
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
|
||||
0.0 0.0 0.0 0.0 1.0 0.0 1.0 0.0
|
||||
|
||||
[pixel shader]
|
||||
sampler s;
|
||||
Texture2D t;
|
||||
|
||||
float4 main() : sv_target
|
||||
{
|
||||
return t.Sample(s, float2(0.5, 0.5));
|
||||
}
|
||||
|
||||
[test]
|
||||
draw quad
|
||||
probe all rgba (0.25, 0, 0.25, 0)
|
||||
|
||||
[pixel shader]
|
||||
SamplerState s;
|
||||
Texture2D t;
|
||||
|
||||
float4 main() : sv_target
|
||||
{
|
||||
return t.Sample(s, float2(0.5, 0.5));
|
||||
}
|
||||
|
||||
[test]
|
||||
draw quad
|
||||
probe all rgba (0.25, 0, 0.25, 0)
|
Reference in New Issue
Block a user