We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a0e160c commit bc806e2Copy full SHA for bc806e2
Source/RunActivity/Viewer3D/Lights.cs
@@ -422,7 +422,7 @@ public abstract class LightPrimitive : RenderPrimitive
422
public LightPrimitive(Light light)
423
{
424
Light = light;
425
- StateCount = Light.Cycle ? 2 * Light.States.Count - 2 : Light.States.Count;
+ StateCount = Math.Max(Light.Cycle ? 2 * Light.States.Count - 2 : Light.States.Count, 1);
426
UpdateStates(State, (State + 1) % StateCount);
427
}
428
0 commit comments