mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
Write the shaders so that texcoord's register index in the vertex output signature matches the register index in the pixel input signature (o0 and v0 in this case) in SM4.
49 lines
947 B
Plaintext
49 lines
947 B
Plaintext
[require]
|
|
point-size
|
|
% For tex2D() with newer shader models.
|
|
options: backcompat
|
|
shader model < 6.0
|
|
|
|
[sampler 0]
|
|
filter linear linear linear
|
|
address clamp clamp clamp
|
|
|
|
[srv 0]
|
|
size (2d, 2, 2)
|
|
1.0 1.0 0.0 1.0 0.0 1.0 1.0 1.0
|
|
1.0 0.0 0.0 1.0 1.0 0.0 1.0 1.0
|
|
|
|
[vertex shader]
|
|
void main(out float2 t : texcoord, out float4 out_pos : sv_position)
|
|
{
|
|
t = float2(1, 1);
|
|
out_pos = float4(0, 0, 0, 1);
|
|
}
|
|
|
|
[pixel shader]
|
|
sampler2D s;
|
|
|
|
float4 main(float2 t : texcoord) : sv_target
|
|
{
|
|
return tex2D(s, t);
|
|
}
|
|
|
|
[test]
|
|
clear rtv 0 0 0 0 0
|
|
point-size 30.0 1.0 64.0
|
|
point-sprite off
|
|
draw point list 1
|
|
probe (310, 230) f32(1, 0, 1, 1)
|
|
probe (330, 230) f32(1, 0, 1, 1)
|
|
probe (310, 250) f32(1, 0, 1, 1)
|
|
probe (330, 250) f32(1, 0, 1, 1)
|
|
|
|
clear rtv 0 0 0 0 0
|
|
point-size 30.0 1.0 64.0
|
|
point-sprite on
|
|
draw point list 1
|
|
probe (310, 230) f32(1, 1, 0, 1)
|
|
probe (330, 230) f32(0, 1, 1, 1)
|
|
probe (310, 250) f32(1, 0, 0, 1)
|
|
probe (330, 250) f32(1, 0, 1, 1)
|