17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-03 01:30:16 +01:00

Add the optional LightOnly of FreeSpotLight

This commit is contained in:
2026-10-28 21:50:08 +01:00
parent 8c6a47f42c
commit 91c6324965
4 changed files with 14 additions and 3 deletions

View File

@@ -3073,8 +3073,9 @@ void scene_walk::Render_Alpha(TSubModel *Submodel)
}
}
}
else if (Submodel->eType == TP_FREESPOTLIGHT)
else if ((Submodel->eType == TP_FREESPOTLIGHT) && (false == Submodel->bLightOnly))
{
// the point of the light and its glare; a light point marked lightonly: only lights its surroundings (gfx::local_lights)
// NOTE: we're forced here to redo view angle calculations etc, because this data isn't instanced but stored along with the single mesh
// TODO: separate instance data from reusable geometry
auto const &modelview = OpenGLMatrices.data(GL_MODELVIEW);