third_party/spirv-cross/shaders-msl/frag/sampler.frag
raw| 1 | #version 310 es |
| 2 | precision mediump float; |
| 3 | |
| 4 | layout(location = 0) in vec4 vColor; |
| 5 | layout(location = 1) in vec2 vTex; |
| 6 | layout(binding = 0) uniform sampler2D uTex; |
| 7 | layout(location = 0) out vec4 FragColor; |
| 8 | |
| 9 | vec4 sample_texture(sampler2D tex, vec2 uv) |
| 10 | { |
| 11 | return texture(tex, uv); |
| 12 | } |
| 13 | |
| 14 | void main() |
| 15 | { |
| 16 | FragColor = vColor * sample_texture(uTex, vTex); |
| 17 | } |
| 18 |