Compare commits

...

2 Commits

Author SHA1 Message Date
Jarrod Doyle 54c8176302
Set SpotlightInnerAngle to -1 on non-spotlights
It's a bit odd but it matches what DromEd does
2024-12-26 21:39:29 +00:00
Jarrod Doyle 8b84e5ce3a
Fix incorrect coloured lights 2024-12-26 21:15:53 +00:00
2 changed files with 6 additions and 3 deletions

View File

@ -220,6 +220,7 @@ public class LightMapper
Radius = float.MaxValue, Radius = float.MaxValue,
R2 = float.MaxValue, R2 = float.MaxValue,
LightTableIndex = lightTable.LightCount, LightTableIndex = lightTable.LightCount,
SpotlightInnerAngle = -1f,
}; };
_lights.Add(light); _lights.Add(light);
@ -288,7 +289,8 @@ public class LightMapper
QuadLit = propAnimLight.QuadLit, QuadLit = propAnimLight.QuadLit,
ObjId = id, ObjId = id,
LightTableIndex = propAnimLight.LightTableLightIndex, LightTableIndex = propAnimLight.LightTableLightIndex,
Anim = true Anim = true,
SpotlightInnerAngle = -1f,
}; };
if (propSpotlight != null) if (propSpotlight != null)
@ -318,6 +320,7 @@ public class LightMapper
QuadLit = propLight.QuadLit, QuadLit = propLight.QuadLit,
ObjId = id, ObjId = id,
LightTableIndex = lightTable.LightCount, LightTableIndex = lightTable.LightCount,
SpotlightInnerAngle = -1f,
}; };
if (propSpotAmb != null) if (propSpotAmb != null)

View File

@ -14,8 +14,8 @@ public static class Utils
var color = hue switch var color = hue switch
{ {
< 1 => new Vector3(1f - hue, hue, 0), < 1 => new Vector3(1f - hue, hue, 0),
< 2 => new Vector3(2f - hue, hue - 1f, 0), < 2 => new Vector3(0, 2f - hue, hue - 1f),
_ => new Vector3(3f - hue, hue - 2, 0), _ => new Vector3(hue - 2f, 0, 3f - hue),
}; };
color *= saturation; color *= saturation;