12345678910111213141516171819202122 |
- #version 430
- layout (binding = 0) uniform sampler2D samp;
- uniform bool useTexture;
- uniform bool useColor;
- in vec4 varColor;
- in vec2 varTextureCoord;
- out vec4 color;
- void main() {
- if(useTexture) {
- color = texture(samp, varTextureCoord);
- if(useColor) {
- color = vec4(varColor.xyz, color.w);
- }
- } else {
- color = varColor;
- }
- }
|