summaryrefslogtreecommitdiffstats
path: root/chromium/third_party/glslang/src/Test/flowControl.frag
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/glslang/src/Test/flowControl.frag')
-rw-r--r--chromium/third_party/glslang/src/Test/flowControl.frag23
1 files changed, 23 insertions, 0 deletions
diff --git a/chromium/third_party/glslang/src/Test/flowControl.frag b/chromium/third_party/glslang/src/Test/flowControl.frag
new file mode 100644
index 00000000000..a6ef419d29d
--- /dev/null
+++ b/chromium/third_party/glslang/src/Test/flowControl.frag
@@ -0,0 +1,23 @@
+#version 120
+
+uniform float d;
+uniform vec4 bigColor, smallColor;
+uniform vec4 otherColor;
+
+varying float c;
+varying vec4 BaseColor;
+
+void main()
+{
+ vec4 color = BaseColor;
+ vec4 color2;
+
+ color2 = otherColor;
+
+ if (c > d)
+ color += bigColor;
+ else
+ color += smallColor;
+
+ gl_FragColor = color * color2;
+}