third_party/spirv-cross/reference/shaders/frag/front-facing.frag
raw| 1 | #version 310 es |
| 2 | precision mediump float; |
| 3 | precision highp int; |
| 4 | |
| 5 | layout(location = 0) out vec4 FragColor; |
| 6 | layout(location = 0) in vec4 vA; |
| 7 | layout(location = 1) in vec4 vB; |
| 8 | |
| 9 | void main() |
| 10 | { |
| 11 | if (gl_FrontFacing) |
| 12 | { |
| 13 | FragColor = vA; |
| 14 | } |
| 15 | else |
| 16 | { |
| 17 | FragColor = vB; |
| 18 | } |
| 19 | } |
| 20 |