1234567891011121314151617181920212223 |
- #version 300 es
- precision highp float;
- uniform sampler2D samp;
- uniform bool useTexture;
- uniform bool useColor;
- in vec2 varTex;
- in vec4 varColor;
- out vec4 color;
- void main() {
- if(useTexture) {
- color = texture(samp, varTex);
- if(useColor) {
- color = vec4(varColor.xyz, color.r);
- }
- } else {
- color = varColor;
- }
- }
|