MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / addSpreadLight

Method addSpreadLight

source/base/StarCellularLighting.cpp:106–112  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

104}
105
106void CellularLightingCalculator::addSpreadLight(Vec2F const& position, Vec3F const& light) {
107 Vec2F arrayPosition = position - Vec2F(m_calculationRegion.min());
108 if (m_monochrome)
109 m_lightArray.right().addSpreadLight({arrayPosition, light.max()});
110 else
111 m_lightArray.left().addSpreadLight({arrayPosition, light});
112}
113
114void CellularLightingCalculator::addPointLight(Vec2F const& position, Vec3F const& light, float beam, float beamAngle, float beamAmbience, bool asSpread) {
115 Vec2F arrayPosition = position - Vec2F(m_calculationRegion.min());

Callers 2

lightingCalcMethod · 0.45
lightLevelFunction · 0.45

Calls 4

rightMethod · 0.80
leftMethod · 0.80
minMethod · 0.45
maxMethod · 0.45

Tested by

no test coverage detected