feat: basic shadow map + renderdoc labels
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user