Renderer/assets/Shaders/core/imagepanel/imagepanel.fs
austin d8ecca2a7b
Some checks failed
studiorailgun/Renderer/pipeline/head There was a failure building this commit
image panel color transparency support
2025-04-13 15:49:41 -04:00

19 lines
459 B
GLSL

#version 430 core
out vec4 FragColor;
in vec2 TexCoords;
uniform sampler2D screenTexture;
uniform vec4 color;
void main(){
vec4 textureColor = texture(screenTexture, TexCoords);
textureColor.r = textureColor.r * color.r;
textureColor.g = textureColor.g * color.g;
textureColor.b = textureColor.b * color.b;
textureColor.a = textureColor.a * color.a;
if(textureColor.a < 0.1){
discard;
}
FragColor = textureColor;
}