diff options
Diffstat (limited to 'Test/hlsl.w-recip.frag')
-rw-r--r-- | Test/hlsl.w-recip.frag | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Test/hlsl.w-recip.frag b/Test/hlsl.w-recip.frag new file mode 100644 index 00000000..4812d269 --- /dev/null +++ b/Test/hlsl.w-recip.frag @@ -0,0 +1,12 @@ +float4 AmbientColor = float4(1, 0.5, 0, 1); +float4 AmbientColor2 = float4(0.5, 1, 0, 0); + +float4 main(float4 vpos : SV_POSITION) : SV_TARGET +{ + float4 vpos_t = float4(vpos.xyz, 1 / vpos.w); + if (vpos_t.x < 400) + return AmbientColor; + else + return AmbientColor2; +} + |