Pong/resources/shaders/Light.frag

21 lines
438 B
GLSL
Raw Permalink Normal View History

2024-07-01 19:55:24 -07:00
#version 450
#extension GL_ARB_separate_shader_objects : enable
layout(location = 0) in vec2 fUv;
layout(location = 0) out vec4 outColor;
layout(binding = 1) uniform Material
{
vec3 lightColor;
} material;
layout(binding = 2) uniform sampler2D render;
void main() {
vec4 result = texture(render, fUv);
if (result.rgb == vec3(1.0f, 1.0f, 1.0f))
result = vec4(material.lightColor, 1.0f);
outColor = vec4(result.rgb, 1.0f);
}