diff options
author | Kae <80987908+Novaenia@users.noreply.github.com> | 2024-03-20 01:53:34 +1100 |
---|---|---|
committer | Kae <80987908+Novaenia@users.noreply.github.com> | 2024-03-20 01:53:34 +1100 |
commit | 6d76a11e256cd96c9cdd7ae5a10c0276e6347277 (patch) | |
tree | d52459889408115d1e0eb657a05dc58e098e50eb /source/game/items/StarMaterialItem.cpp | |
parent | 58a346e563df12af9194c198c7ffe974411abb28 (diff) |
experiment: unclamped lighting
Diffstat (limited to 'source/game/items/StarMaterialItem.cpp')
-rw-r--r-- | source/game/items/StarMaterialItem.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/game/items/StarMaterialItem.cpp b/source/game/items/StarMaterialItem.cpp index 42f90fc..4d13a62 100644 --- a/source/game/items/StarMaterialItem.cpp +++ b/source/game/items/StarMaterialItem.cpp @@ -122,7 +122,7 @@ void MaterialItem::update(float dt, FireMode fireMode, bool shifting, HashSet<Mo void MaterialItem::render(RenderCallback* renderCallback, EntityRenderLayer) { if (m_collisionOverride != TileCollisionOverride::None) { float pulseLevel = 1.f - 0.3f * 0.5f * ((float)sin(2 * Constants::pi * 4.0 * Time::monotonicTime()) + 1.f); - Color color = Color::rgba(owner()->favoriteColor()).mix(Color::White); + Color color = owner()->favoriteColor().mix(Color::White); color.setAlphaF(color.alphaF() * pulseLevel * 0.95f); auto addIndicator = [&](String const& path) { Vec2F basePosition = Vec2F(0.5f, 0.5f); @@ -336,7 +336,7 @@ TileCollisionOverride& MaterialItem::collisionOverride() { List<PreviewTile> MaterialItem::previewTiles(bool shifting) const { List<PreviewTile> result; if (initialized()) { - Color lightColor = Color::rgba(owner()->favoriteColor()); + Color lightColor = owner()->favoriteColor(); Vec3B light = lightColor.toRgb(); auto material = materialId(); |