2022-04-14 03:52:41 -07:00
|
|
|
[pixel shader]
|
|
|
|
uniform float4x4 m;
|
|
|
|
|
|
|
|
float4 main() : SV_TARGET
|
|
|
|
{
|
|
|
|
return float4(m[0][0], m[1][0], m[1][2], m[2][3]);
|
|
|
|
}
|
|
|
|
|
|
|
|
[test]
|
|
|
|
uniform 0 float4 1.0 2.0 3.0 4.0
|
|
|
|
uniform 4 float4 5.0 6.0 7.0 8.0
|
|
|
|
uniform 8 float4 9.0 10.0 11.0 12.0
|
|
|
|
uniform 12 float4 13.0 14.0 15.0 16.0
|
2023-10-10 21:33:27 -07:00
|
|
|
draw quad
|
2022-04-14 03:52:41 -07:00
|
|
|
probe all rgba (1.0, 2.0, 10.0, 15.0)
|
|
|
|
|
|
|
|
[pixel shader]
|
|
|
|
uniform column_major float4x4 m;
|
|
|
|
|
|
|
|
float4 main() : SV_TARGET
|
|
|
|
{
|
|
|
|
return float4(m[0][0], m[1][0], m[1][2], m[2][3]);
|
|
|
|
}
|
|
|
|
|
|
|
|
[test]
|
|
|
|
uniform 0 float4 1.0 2.0 3.0 4.0
|
|
|
|
uniform 4 float4 5.0 6.0 7.0 8.0
|
|
|
|
uniform 8 float4 9.0 10.0 11.0 12.0
|
|
|
|
uniform 12 float4 13.0 14.0 15.0 16.0
|
2023-10-10 21:33:27 -07:00
|
|
|
draw quad
|
2022-04-14 03:52:41 -07:00
|
|
|
probe all rgba (1.0, 2.0, 10.0, 15.0)
|
|
|
|
|
|
|
|
[pixel shader]
|
|
|
|
uniform row_major float4x4 m;
|
|
|
|
|
|
|
|
float4 main() : SV_TARGET
|
|
|
|
{
|
|
|
|
return float4(m[0][0], m[1][0], m[1][2], m[2][3]);
|
|
|
|
}
|
|
|
|
|
|
|
|
[test]
|
|
|
|
uniform 0 float4 1.0 2.0 3.0 4.0
|
|
|
|
uniform 4 float4 5.0 6.0 7.0 8.0
|
|
|
|
uniform 8 float4 9.0 10.0 11.0 12.0
|
|
|
|
uniform 12 float4 13.0 14.0 15.0 16.0
|
2023-10-10 21:33:27 -07:00
|
|
|
draw quad
|
2022-04-14 03:52:41 -07:00
|
|
|
probe all rgba (1.0, 5.0, 7.0, 12.0)
|
2022-04-17 23:34:02 -07:00
|
|
|
|
|
|
|
[pixel shader]
|
2022-04-22 03:25:02 -07:00
|
|
|
uniform float3x2 m;
|
2022-04-17 23:34:02 -07:00
|
|
|
|
|
|
|
float4 main() : SV_TARGET
|
|
|
|
{
|
2022-04-22 03:25:02 -07:00
|
|
|
float3x2 m2 = m;
|
|
|
|
return float4(m2[0][0], m2[2][0], m2[1][1], m2[2][1]);
|
2022-04-17 23:34:02 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
[test]
|
2022-04-22 03:25:02 -07:00
|
|
|
uniform 0 float4 1.0 2.0 3.0 0.0
|
|
|
|
uniform 4 float4 5.0 6.0 7.0 0.0
|
2023-10-10 21:33:27 -07:00
|
|
|
draw quad
|
2022-04-22 03:25:02 -07:00
|
|
|
probe all rgba (1.0, 3.0, 6.0, 7.0)
|
2022-04-27 01:56:26 -07:00
|
|
|
|
|
|
|
[pixel shader]
|
|
|
|
float4 main() : SV_TARGET
|
|
|
|
{
|
|
|
|
float2x2 a = float2x2(11.0, 12.0, 13.0, 14.0);
|
|
|
|
float4x4 m = float4x4(1.0, 2.0, 3.0, 4.0,
|
|
|
|
float3(5.0, 6.0, 7.0), 8.0,
|
|
|
|
9.0, 10.0,
|
|
|
|
a,
|
|
|
|
15.0, 16.0);
|
|
|
|
return float4(m[0][0], m[1][0], m[1][2], m[2][3]);
|
|
|
|
}
|
|
|
|
|
|
|
|
[test]
|
2022-04-28 06:32:04 -07:00
|
|
|
draw quad
|
2022-04-27 01:56:26 -07:00
|
|
|
probe all rgba (1.0, 5.0, 7.0, 12.0)
|
2023-03-07 06:51:04 -08:00
|
|
|
|
|
|
|
|
2023-03-10 12:23:49 -08:00
|
|
|
[pixel shader]
|
2023-03-07 06:51:04 -08:00
|
|
|
float4 main() : SV_TARGET
|
|
|
|
{
|
|
|
|
float3x2 m = {1, 2, 3, 4, 5, 6};
|
|
|
|
|
|
|
|
m[1] = float2(30, 40);
|
|
|
|
|
|
|
|
return float4(m[1], m[2]);
|
|
|
|
}
|
|
|
|
|
|
|
|
[test]
|
2023-03-10 12:23:49 -08:00
|
|
|
draw quad
|
|
|
|
probe all rgba (30.0, 40.0, 5.0, 6.0)
|
2023-03-07 06:51:04 -08:00
|
|
|
|
|
|
|
|
|
|
|
[pixel shader]
|
|
|
|
float4 main() : SV_TARGET
|
|
|
|
{
|
|
|
|
row_major float3x2 m = {1, 2, 3, 4, 5, 6};
|
|
|
|
|
|
|
|
m[2] = float2(50, 60);
|
|
|
|
|
|
|
|
return float4(m[1], m[2]);
|
|
|
|
}
|
|
|
|
|
|
|
|
[test]
|
|
|
|
draw quad
|
|
|
|
probe all rgba (3.0, 4.0, 50.0, 60.0)
|
|
|
|
|
|
|
|
|
2023-11-01 13:07:46 -07:00
|
|
|
[pixel shader]
|
2023-03-07 06:51:04 -08:00
|
|
|
uniform float i;
|
|
|
|
|
|
|
|
float4 main() : sv_target
|
|
|
|
{
|
|
|
|
float4x4 mat = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15};
|
|
|
|
|
|
|
|
return mat[i];
|
|
|
|
}
|
|
|
|
|
|
|
|
[test]
|
|
|
|
uniform 0 float 2
|
2023-11-01 13:07:46 -07:00
|
|
|
draw quad
|
|
|
|
todo(sm<4) probe all rgba (8, 9, 10, 11)
|
2023-03-07 06:51:04 -08:00
|
|
|
|
|
|
|
|
2023-11-15 12:41:33 -08:00
|
|
|
[pixel shader todo(sm<4)]
|
2023-03-07 06:51:04 -08:00
|
|
|
uniform float i;
|
|
|
|
|
|
|
|
float4 main() : sv_target
|
|
|
|
{
|
|
|
|
row_major float4x4 mat = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15};
|
|
|
|
|
|
|
|
return mat[i];
|
|
|
|
}
|
|
|
|
|
|
|
|
[test]
|
|
|
|
uniform 0 float 3
|
2023-11-15 12:41:33 -08:00
|
|
|
todo(sm<4) draw quad
|
2023-11-21 18:42:23 -08:00
|
|
|
probe all rgba (12, 13, 14, 15)
|