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
|
|
|
|
todo draw quad
|
|
|
|
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
|
|
|
|
todo draw quad
|
|
|
|
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
|
|
|
|
todo draw quad
|
|
|
|
probe all rgba (1.0, 5.0, 7.0, 12.0)
|
2022-04-17 23:34:02 -07:00
|
|
|
|
|
|
|
[pixel shader]
|
|
|
|
uniform float4x4 m;
|
|
|
|
|
|
|
|
float4 main() : SV_TARGET
|
|
|
|
{
|
|
|
|
float4x4 m2 = m;
|
|
|
|
return float4(m2[0][0], m2[1][0], m2[1][2], m2[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
|
|
|
|
todo draw quad
|
|
|
|
probe all rgba (1.0, 2.0, 10.0, 15.0)
|