2024-04-27 03:35:07 -07:00
|
|
|
[require]
|
|
|
|
shader model >= 6.0
|
|
|
|
|
|
|
|
[pixel shader]
|
|
|
|
uint u, v, w;
|
|
|
|
|
|
|
|
static float foo[3] = {0.25, 0.5, 0.75};
|
|
|
|
|
|
|
|
float4 main(float4 pos : SV_Position) : SV_Target
|
|
|
|
{
|
|
|
|
// Compiles to a constexpr uint pointer cast of foo for a store instruction.
|
|
|
|
if (v)
|
|
|
|
foo[1] = asfloat(w);
|
|
|
|
return float4(foo[u], foo[u + 1], 0.0, 1.0);
|
|
|
|
}
|
|
|
|
|
|
|
|
[test]
|
|
|
|
uniform 0 uint4 0 1 0x3e000000 0
|
2024-02-14 18:08:46 -08:00
|
|
|
draw quad
|
2024-02-10 11:16:22 -08:00
|
|
|
probe (0, 0) rgba (0.25, 0.125, 0.0, 1.0)
|
2024-04-27 03:35:07 -07:00
|
|
|
uniform 0 uint4 1 0 0x3e000000 0
|
2024-02-14 18:08:46 -08:00
|
|
|
draw quad
|
2024-02-10 11:16:22 -08:00
|
|
|
probe (0, 0) rgba (0.5, 0.75, 0.0, 1.0)
|