2022-04-06 14:05:37 -07:00
|
|
|
[require]
|
|
|
|
shader model >= 4.0
|
|
|
|
|
2024-01-24 11:11:17 -08:00
|
|
|
[srv 0]
|
|
|
|
size (2d, 2, 2)
|
2021-10-03 17:19:08 -07:00
|
|
|
0.1 0.2 0.3 0.4 0.5 0.7 0.6 0.8
|
|
|
|
0.6 0.5 0.2 0.1 0.8 0.0 0.7 1.0
|
|
|
|
|
|
|
|
[pixel shader]
|
|
|
|
Texture2D t;
|
|
|
|
|
|
|
|
float4 main(float4 pos : sv_position) : sv_target
|
|
|
|
{
|
|
|
|
return t.Load(int3(pos.xy, 0));
|
|
|
|
}
|
|
|
|
|
|
|
|
[test]
|
2024-03-19 04:36:23 -07:00
|
|
|
todo(glsl) draw quad
|
2022-04-17 23:33:58 -07:00
|
|
|
probe (0, 0) rgba (0.1, 0.2, 0.3, 0.4)
|
|
|
|
probe (1, 0) rgba (0.5, 0.7, 0.6, 0.8)
|
|
|
|
probe (0, 1) rgba (0.6, 0.5, 0.2, 0.1)
|
|
|
|
probe (1, 1) rgba (0.8, 0.0, 0.7, 1.0)
|
2021-08-12 16:26:53 -07:00
|
|
|
|
|
|
|
[pixel shader]
|
|
|
|
Texture2D t;
|
|
|
|
|
|
|
|
float4 main(float4 pos : sv_position) : sv_target
|
|
|
|
{
|
|
|
|
return t[pos.yx];
|
|
|
|
}
|
|
|
|
|
|
|
|
[test]
|
2024-03-19 04:36:23 -07:00
|
|
|
todo(glsl) draw quad
|
2021-08-12 16:26:53 -07:00
|
|
|
probe (0, 0) rgba (0.1, 0.2, 0.3, 0.4)
|
|
|
|
probe (1, 0) rgba (0.6, 0.5, 0.2, 0.1)
|
|
|
|
probe (0, 1) rgba (0.5, 0.7, 0.6, 0.8)
|
|
|
|
probe (1, 1) rgba (0.8, 0.0, 0.7, 1.0)
|
2023-04-27 01:15:36 -07:00
|
|
|
|
|
|
|
[pixel shader]
|
2023-06-28 02:28:49 -07:00
|
|
|
static const int size = 2;
|
|
|
|
Texture2DMS<float4, size - 1> t;
|
2023-04-27 01:15:36 -07:00
|
|
|
|
|
|
|
float4 main(float4 pos : sv_position) : sv_target
|
|
|
|
{
|
|
|
|
return t.Load(pos.yx, 0);
|
|
|
|
}
|
|
|
|
|
|
|
|
[test]
|
2024-03-19 04:36:23 -07:00
|
|
|
todo(glsl) draw quad
|
2023-04-27 01:15:36 -07:00
|
|
|
probe (0, 0) rgba (0.1, 0.2, 0.3, 0.4)
|
|
|
|
probe (1, 0) rgba (0.6, 0.5, 0.2, 0.1)
|
|
|
|
probe (0, 1) rgba (0.5, 0.7, 0.6, 0.8)
|
|
|
|
probe (1, 1) rgba (0.8, 0.0, 0.7, 1.0)
|
2023-12-13 03:14:39 -08:00
|
|
|
|
|
|
|
% The sample count only matters for the external definition in SM4-5;
|
|
|
|
% internally it doesn't, you can even avoid it
|
|
|
|
|
|
|
|
[require]
|
|
|
|
shader model >= 4.0
|
|
|
|
shader model < 6.0
|
|
|
|
|
|
|
|
[pixel shader]
|
|
|
|
static const int size = 2;
|
|
|
|
Texture2DMS<float4, size - 1> t;
|
|
|
|
|
|
|
|
float4 main(float4 pos : sv_position) : sv_target
|
|
|
|
{
|
|
|
|
Texture2DMS<float4, 4> s = t;
|
|
|
|
return s.Load(pos.yx, 0);
|
|
|
|
}
|
|
|
|
|
|
|
|
[test]
|
2024-03-19 04:36:23 -07:00
|
|
|
todo(glsl) draw quad
|
2023-12-13 03:14:39 -08:00
|
|
|
probe (0, 0) rgba (0.1, 0.2, 0.3, 0.4)
|
|
|
|
probe (1, 0) rgba (0.6, 0.5, 0.2, 0.1)
|
|
|
|
probe (0, 1) rgba (0.5, 0.7, 0.6, 0.8)
|
|
|
|
probe (1, 1) rgba (0.8, 0.0, 0.7, 1.0)
|
|
|
|
|
|
|
|
[pixel shader todo]
|
|
|
|
static const int size = 2;
|
|
|
|
Texture2DMS<float4, size - 1> t;
|
|
|
|
|
|
|
|
float4 main(float4 pos : sv_position) : sv_target
|
|
|
|
{
|
|
|
|
Texture2DMS<float4> s = t;
|
|
|
|
return s.Load(pos.yx, 0);
|
|
|
|
}
|
|
|
|
|
|
|
|
[test]
|
|
|
|
todo draw quad
|
|
|
|
probe (0, 0) rgba (0.1, 0.2, 0.3, 0.4)
|
|
|
|
probe (1, 0) rgba (0.6, 0.5, 0.2, 0.1)
|
|
|
|
probe (0, 1) rgba (0.5, 0.7, 0.6, 0.8)
|
|
|
|
probe (1, 1) rgba (0.8, 0.0, 0.7, 1.0)
|
|
|
|
|
|
|
|
% SM6 is stricter instead
|
|
|
|
|
|
|
|
[require]
|
|
|
|
shader model >= 6.0
|
|
|
|
|
|
|
|
[pixel shader fail]
|
|
|
|
static const int size = 2;
|
|
|
|
Texture2DMS<float4, size - 1> t;
|
|
|
|
|
|
|
|
float4 main(float4 pos : sv_position) : sv_target
|
|
|
|
{
|
|
|
|
Texture2DMS<float4, 4> s = t;
|
|
|
|
return s.Load(pos.yx, 0);
|
|
|
|
}
|
|
|
|
|
|
|
|
[pixel shader fail]
|
|
|
|
static const int size = 2;
|
|
|
|
Texture2DMS<float4, size - 1> t;
|
|
|
|
|
|
|
|
float4 main(float4 pos : sv_position) : sv_target
|
|
|
|
{
|
|
|
|
Texture2DMS<float4> s = t;
|
|
|
|
return s.Load(pos.yx, 0);
|
|
|
|
}
|
2024-03-26 14:11:22 -07:00
|
|
|
|
|
|
|
% SM4.0 cannot dynamically index multisampled textures, it relies on loop unrolling.
|
|
|
|
|
|
|
|
[require]
|
|
|
|
shader model >= 4.0
|
|
|
|
shader model < 4.1
|
|
|
|
|
2024-04-11 07:11:14 -07:00
|
|
|
[pixel shader]
|
2024-03-26 14:11:22 -07:00
|
|
|
Texture2DMS<float4, 1> t;
|
|
|
|
|
|
|
|
float4 main(float4 pos : sv_position) : sv_target
|
|
|
|
{
|
|
|
|
int i;
|
|
|
|
float4 o;
|
|
|
|
for (i = 0; i < 1; i++)
|
|
|
|
{
|
|
|
|
o = t.Load(pos.xy, i);
|
|
|
|
}
|
|
|
|
return o;
|
|
|
|
}
|
|
|
|
|
|
|
|
[test]
|
2024-04-11 07:11:14 -07:00
|
|
|
todo(glsl) draw quad
|
2024-03-26 14:11:22 -07:00
|
|
|
probe (0, 0) rgba (0.1, 0.2, 0.3, 0.4)
|
|
|
|
probe (1, 0) rgba (0.5, 0.7, 0.6, 0.8)
|
|
|
|
probe (0, 1) rgba (0.6, 0.5, 0.2, 0.1)
|
|
|
|
probe (1, 1) rgba (0.8, 0.0, 0.7, 1.0)
|