1234567891011121314151617181920212223242526272829303132 |
- #version 430
- layout (binding = 0) uniform sampler2D samp;
- uniform mat4 projMatrix;
- uniform mat4 viewMatrix;
- uniform mat4 modelMatrix;
- uniform bool useTexture;
- uniform bool useColor;
- uniform bool useMixColor;
- uniform vec4 mixColor;
- uniform bool useNormals;
- in vec2 tc;
- in vec4 outColor;
- out vec4 color;
- void main(void) {
- if(useTexture) {
- color = texture(samp, tc);
- if(useColor) {
- if(useMixColor) {
- color = (color + mixColor) * 0.5;
- } else {
- color = vec4(outColor.xyz, color.w);
- }
- }
- } else {
- color = outColor;
- }
- }
|