mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-01-28 13:05:02 -08:00
While it looks complicated, it is what fxc/d3dcompiler does. A shader as simple as: float4 f; float4 main() : sv_target { return (int4)f; } results in the following instructions: ps_2_0 def c1, 0, 1, 0, 0 frc r0, c0 cmp r1, -r0, c1.x, c1.y add r0, -r0, c0 mov r2, c0 cmp r1, r2, c1.x, r1 add r0, r0, r1 mov oC0, r0