17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-06 04:38:37 +01:00

Use clustered light lists in forward shading

This commit is contained in:
2026-10-15 16:16:53 +02:00
parent 6aa6e505e8
commit 9f2ae071a6
9 changed files with 117 additions and 51 deletions

View File

@@ -76,12 +76,7 @@ vec3 apply_lights_sunless(vec3 fragcolor, vec3 fragnormal, vec3 texturecolor, fl
float specularamount = sunlight.y * param[1].y * specularity * lights[0].intensity;
for (uint i = 1U; i < lights_count; i++)
{
light_s light = lights[i];
vec2 part = calc_headlights(light, fragnormal);
fragcolor += light.color * (part.x + part.y * param[1].y) * light.intensity;
}
fragcolor = add_headlights(fragcolor, fragnormal);
if (shadowtone < 1.0)
{