Implement something like deferred lighting

This commit is contained in:
2021-09-01 00:37:07 +01:00
parent 2d139adc8f
commit 1c587d4b9a
13 changed files with 90 additions and 71 deletions
+5 -9
View File
@@ -1,15 +1,11 @@
#version 430 core
out vec4 FragColor;
layout (location=0) out vec4 fCol;
layout (location=1) out vec4 fPos;
uniform sampler2D aTexture;
in vec4 gColor;
in vec2 gTexCoord;
uniform sampler2D aTexture;
void main()
{
FragColor = texture(aTexture, vec2 (gTexCoord.x * 0.0078125, gTexCoord.y)) * gColor;
// FragColor = texture(aTexture, vTexCoord);
// FragColor = gColor;
// FragColor = vec4 (1,1,1,1);
fCol = texture(aTexture, vec2 (gTexCoord.x * 0.0078125, gTexCoord.y)) * gColor;
fPos = vec4(0,0,0,0);
}