This commit is contained in:
2026-10-26 01:59:48 -04:00
commit a6103e453d
1020 changed files with 255623 additions and 0 deletions
+41
View File
@@ -0,0 +1,41 @@
#version 330 core
out vec4 FragColor;
in vec2 TexCoord;
uniform sampler2D gPosition;
uniform sampler2D gNormal;
uniform sampler2D gAlbedo;
uniform sampler2D gLightSpacePos;
uniform sampler2DShadow shadowMap;
uniform sampler2D depthTex;
uniform int debugMode; // 0 = final, 1 = position, 2 = normal, 3 = albedo, 4 = lightspace, 5 = depth
void main()
{
if (debugMode == 1) {
vec3 v = texture(gPosition, TexCoord).rgb;
FragColor = vec4(v * 0.01 + 0.5, 1.0);
return;
}
if (debugMode == 2) {
vec3 n = normalize(texture(gNormal, TexCoord).rgb);
FragColor = vec4(n * 0.5 + 0.5, 1.0);
return;
}
if (debugMode == 3) {
FragColor = texture(gAlbedo, TexCoord);
return;
}
if (debugMode == 4) {
FragColor = texture(gLightSpacePos, TexCoord);
return;
}
if (debugMode == 5) {
float d = texture(depthTex, TexCoord).r;
FragColor = vec4(vec3(d), 1.0);
return;
}
FragColor = vec4(0.0);
}