mirror of
https://github.com/RetroDECK/Supermodel.git
synced 2025-04-10 19:15:14 +00:00
disable spot light if the extent is zero
This commit is contained in:
parent
1c39956568
commit
732bff2769
|
@ -704,6 +704,11 @@ void CNew3D::RenderViewport(UINT32 addr)
|
|||
|
||||
vp->spotRange[0] = 1.0f / (*(float *)&vpnode[0x21]); // spotlight start
|
||||
vp->spotRange[1] = *(float *)&vpnode[0x1F]; // spotlight extent
|
||||
|
||||
if (vp->spotRange[1] == 0) { // if light extent = 0 light is effectively disabled
|
||||
spotColorIdx = 0;
|
||||
}
|
||||
|
||||
vp->spotColor[0] = color[spotColorIdx][0]; // spotlight color
|
||||
vp->spotColor[1] = color[spotColorIdx][1];
|
||||
vp->spotColor[2] = color[spotColorIdx][2];
|
||||
|
|
Loading…
Reference in a new issue