opengl.light: Add 'Strength' to lights.

This commit is contained in:
Rod Kay
2024-02-28 21:11:59 +11:00
parent 25373dabfe
commit 0b655ea2be
4 changed files with 39 additions and 21 deletions

View File

@@ -4,6 +4,7 @@
struct light
{
vec4 Site;
float Strength;
vec3 Color;
float Attenuation;
float ambient_Coefficient;
@@ -67,7 +68,7 @@ apply_Light (light Light,
// Abmbient.
//
vec3 lit_surface_Color = surface_Color * Light.Color;
vec3 lit_surface_Color = surface_Color * Light.Color * Light.Strength;
vec3 Ambient = Light.ambient_Coefficient * lit_surface_Color;