diff options
author | Kae <80987908+Novaenia@users.noreply.github.com> | 2024-03-26 07:31:33 +1100 |
---|---|---|
committer | Kae <80987908+Novaenia@users.noreply.github.com> | 2024-03-26 07:31:33 +1100 |
commit | c484fab32dcac655164f082805d1d55d1d058f2f (patch) | |
tree | 9eeabdaee723a88bbebdd77d41d1bb93ee3def83 /source/base/StarCellularLighting.cpp | |
parent | 77d7f8eb81af21dd231f6384951fc2c14c149d5c (diff) |
experiment: auto-conversion of object spread lights to hybrid spread/point lights
Diffstat (limited to 'source/base/StarCellularLighting.cpp')
-rw-r--r-- | source/base/StarCellularLighting.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/base/StarCellularLighting.cpp b/source/base/StarCellularLighting.cpp index 579f48a..3e5cf9a 100644 --- a/source/base/StarCellularLighting.cpp +++ b/source/base/StarCellularLighting.cpp @@ -109,12 +109,12 @@ void CellularLightingCalculator::addSpreadLight(Vec2F const& position, Vec3F con m_lightArray.left().addSpreadLight({arrayPosition, light}); } -void CellularLightingCalculator::addPointLight(Vec2F const& position, Vec3F const& light, float beam, float beamAngle, float beamAmbience) { +void CellularLightingCalculator::addPointLight(Vec2F const& position, Vec3F const& light, float beam, float beamAngle, float beamAmbience, bool asSpread) { Vec2F arrayPosition = position - Vec2F(m_calculationRegion.min()); if (m_monochrome) - m_lightArray.right().addPointLight({arrayPosition, light.max(), beam, beamAngle, beamAmbience}); + m_lightArray.right().addPointLight({arrayPosition, light.max(), beam, beamAngle, beamAmbience, asSpread}); else - m_lightArray.left().addPointLight({arrayPosition, light, beam, beamAngle, beamAmbience}); + m_lightArray.left().addPointLight({arrayPosition, light, beam, beamAngle, beamAmbience, asSpread}); } void CellularLightingCalculator::calculate(Image& output) { |