spooky-game/assets/shaders/compositor-fragment.glsl

23 lines
537 B
GLSL
Executable File

#version 450
layout (location = 0) in vec3 vPosition;
layout (location = 1) in vec2 vTexCoords;
layout (location = 0) out vec4 outColor;
layout (binding = 0) uniform sampler2D albedo;
layout (binding = 1) uniform sampler2D light;
void main() {
// Texturing
vec4 diffuseTexel = texture2D(albedo, vTexCoords);
vec4 lightTexel = texture2D(light, vTexCoords);
// Final color
outColor = diffuseTexel * (lightTexel);
// outColor = diffuseTexel;// * (lightTexel);
outColor.a = diffuseTexel.a;
// outColor = lightTexel;
}