feat: basic shadow map + renderdoc labels

This commit is contained in:
2026-10-11 01:02:26 +02:00
parent 4bf87bd91b
commit 95d1497169
36 changed files with 880 additions and 228 deletions
+2 -2
View File
@@ -44,7 +44,7 @@ float calculateSpotAttenuation(Light light, vec3 l)
}
vec3 calculateLight(Light light, vec3 fragPos, vec3 n, vec3 v,
vec3 diffuseColor, float roughness, float metallic, vec3 f0)
vec3 diffuseColor, float roughness, float metallic, vec3 f0, float occlusion)
{
vec3 l;
float attenuation = 1.0;
@@ -80,7 +80,7 @@ vec3 calculateLight(Light light, vec3 fragPos, vec3 n, vec3 v,
vec3 kd = (vec3(1.0) - F) * (1.0 - metallic);
vec3 diffuse = kd * diffuseColor / PI;
return (diffuse + specular) * light.color * light.intensity * attenuation * NoL;
return (diffuse + specular) * light.color * light.intensity * attenuation * NoL * occlusion;
}
// blue -> green -> red, used to visualise how many lights a tile has