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

21 lines
502 B
Plaintext
Raw Normal View History

2020-08-13 20:14:37 +02:00
#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 albedoTexel = texture2D(albedo, vTexCoords);
vec4 lightTexel = texture2D(light, vTexCoords);
// Final color
outColor = albedoTexel * (lightTexel);
outColor = albedoTexel;// * (lightTexel);
2020-08-13 20:14:37 +02:00
outColor.a = albedoTexel.a;
}