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