grakopro/cw_8/shaders/part.frag

15 lines
285 B
GLSL

#version 430 core
in vec2 TexCoords;
in vec4 ParticleColor;
out vec4 FragColor;
uniform sampler2D sprite;
void main()
{
if(ParticleColor.w > 0){
FragColor = (texture(sprite, TexCoords) * ParticleColor);
}else{
FragColor = texture(sprite, TexCoords);
}
}