third_party/spirv-cross/shaders/frag/loop-dominator-and-switch-default.frag
raw| 1 | #version 310 es |
| 2 | precision mediump float; |
| 3 | |
| 4 | layout(location = 0) out vec4 fragColor; |
| 5 | |
| 6 | void main() |
| 7 | { |
| 8 | vec4 f4; |
| 9 | int c = int(f4.x); |
| 10 | |
| 11 | for (int j = 0; j < c; j++) |
| 12 | { |
| 13 | switch (c) |
| 14 | { |
| 15 | case 0: |
| 16 | f4.y = 0.0; |
| 17 | break; |
| 18 | case 1: |
| 19 | f4.y = 1.0; |
| 20 | break; |
| 21 | default: |
| 22 | { |
| 23 | int i = 0; |
| 24 | while (i++ < c) { |
| 25 | f4.y += 0.5; |
| 26 | } |
| 27 | continue; |
| 28 | } |
| 29 | } |
| 30 | f4.y += 0.5; |
| 31 | } |
| 32 | |
| 33 | fragColor = f4; |
| 34 | } |