From 7d058402772ccdb2b9ac9d0879f9552ed70400bf Mon Sep 17 00:00:00 2001 From: cosmonaut Date: Sat, 22 Aug 2020 18:00:04 -0700 Subject: [PATCH] fix intensity array for point lights --- Effects/PointLightCollection.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Effects/PointLightCollection.cs b/Effects/PointLightCollection.cs index 708a180..53c459b 100644 --- a/Effects/PointLightCollection.cs +++ b/Effects/PointLightCollection.cs @@ -7,7 +7,7 @@ namespace Kav { private readonly Vector3[] positions; private readonly Vector3[] colors; - private readonly float[] intensities = new float[4]; + private readonly float[] intensities; readonly EffectParameter lightPositionsParam; readonly EffectParameter lightColorsParam; @@ -16,6 +16,7 @@ namespace Kav { this.positions = new Vector3[maxLights]; this.colors = new Vector3[maxLights]; + this.intensities = new float[maxLights]; this.lightPositionsParam = lightPositionsParam; this.lightColorsParam = lightColorsParam; }