Skip to content

Commit

Permalink
tr_shader: do not cancel overbright on decals (impact marks)
Browse files Browse the repository at this point in the history
  • Loading branch information
illwieckz committed May 28, 2024
1 parent 70d73ab commit 77bb504
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/engine/renderer/tr_shader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5223,6 +5223,13 @@ static void FinishStages()
// We should cancel overBrightBits if there is no light stage.
stage->shaderHasNoLight = shaderHasNoLight;

// We should not cancel overbright on decals.
if ( shader.sort == Util::ordinal(shaderSort_t::SS_DECAL) )
{
// HACK: Reuse that boolean.
stage->shaderHasNoLight = false;
}

// Available textures.
bool hasNormalMap = stage->bundle[ TB_NORMALMAP ].image[ 0 ] != nullptr;
bool hasHeightMap = stage->bundle[ TB_HEIGHTMAP ].image[ 0 ] != nullptr;
Expand Down

0 comments on commit 77bb504

Please sign in to comment.