Skip to content

Commit

Permalink
tr_shader: do not enable deluxe map on material without normal map
Browse files Browse the repository at this point in the history
fix a regression introduced in 3d53075
  • Loading branch information
illwieckz committed Mar 31, 2019
1 parent 0beb003 commit 8aa22f4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/engine/renderer/tr_shade.cpp
Expand Up @@ -1154,8 +1154,8 @@ static void Render_lightMapping( int stage, bool asColorMap, bool normalMapping,

GL_State( stateBits );

bool deluxeMapping = r_deluxeMapping->integer && tr.worldDeluxeMapping;
normalMapping = normalMapping && deluxeMapping && ( pStage->bundle[ TB_NORMALMAP ].image[ 0 ] != nullptr );
bool deluxeMapping = r_deluxeMapping->integer && tr.worldDeluxeMapping && ( pStage->bundle[ TB_NORMALMAP ].image[ 0 ] != nullptr );
normalMapping = normalMapping && deluxeMapping;
bool heightMapInNormalMap = tess.surfaceShader->heightMapInNormalMap && ( pStage->bundle[ TB_NORMALMAP ].image[ 0 ] != nullptr );
bool parallaxMapping = r_parallaxMapping->integer && tess.surfaceShader->parallax && !tess.surfaceShader->noParallax && heightMapInNormalMap;
bool specularMapping = r_specularMapping->integer && ( pStage->bundle[ TB_SPECULARMAP ].image[ 0 ] );
Expand Down

0 comments on commit 8aa22f4

Please sign in to comment.