You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
364 B
GLSL
15 lines
364 B
GLSL
precision highp float;
|
|
varying vec2 texCoords;
|
|
uniform sampler2D textureSampler;
|
|
uniform vec3 drawColor;
|
|
uniform vec3 backgroundColor;
|
|
|
|
void main() {
|
|
vec4 textureColor = texture2D(textureSampler, texCoords);
|
|
float alphaValue = textureColor.a;
|
|
|
|
vec3 resultColor = mix(backgroundColor, drawColor, alphaValue * 255.0);
|
|
|
|
gl_FragColor = vec4(resultColor, 1);
|
|
}
|