123456789101112131415161718192021222324252627 |
- #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;
- }
- }
|