aboutsummaryrefslogtreecommitdiff
path: root/Test/hlsl.w-recip.frag
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-04-28 03:05:39 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-04-28 03:05:39 +0000
commitba4fb26c192bca675a334fdab4a46285c7cd5232 (patch)
tree6f2dd3d1fefacccdeecfa74317972d9c7e36c114 /Test/hlsl.w-recip.frag
parent20e9adfc02fe14a057fd270fe2f06d36ad0e6e37 (diff)
parentb775dea081bb2e671628125b23a6705a866822ef (diff)
downloadglslang-ndk-r25-release.tar.gz
Snap for 8508678 from b775dea081bb2e671628125b23a6705a866822ef to ndk-r25-releasendk-r25cndk-r25bndk-r25ndk-r25-release
Change-Id: Iceb7a342c32e98df7127df2e52e7d051eb3518f5
Diffstat (limited to 'Test/hlsl.w-recip.frag')
-rw-r--r--Test/hlsl.w-recip.frag12
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;
+}
+