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

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