17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-25 16:15:14 +01:00

Keep the hotspotpower of light points apart from their colour

This commit is contained in:
2026-10-19 17:51:13 +02:00
parent 8c00b0bc3d
commit 0545f93f24
4 changed files with 31 additions and 21 deletions

View File

@@ -2050,8 +2050,8 @@ void NvRenderer::Animate(Renderable &renderable, TSubModel *Submodel,
Renderable::SpotLight &spotlight = renderable.m_spotlights.emplace_back();
spotlight.m_origin = model_transform[3];
spotlight.m_direction = glm::normalize(-model_transform[2]);
spotlight.m_color =
Submodel->f4Diffuse * Config()->m_lighting.m_freespot_multiplier;
spotlight.m_color = Submodel->f4Diffuse * Submodel->fHotspotPower *
Config()->m_lighting.m_freespot_multiplier;
spotlight.m_cos_outer_cone = Submodel->fCosFalloffAngle;
spotlight.m_cos_inner_cone = Submodel->fCosHotspotAngle;
spotlight.m_radius = glm::sqrt(