Skip to content
Permalink
Browse files

tr_shader: do not enable deluxe map on material without normal map

fix a regression introduced in 3d53075
  • Loading branch information...
illwieckz committed Mar 31, 2019
1 parent 0beb003 commit 8aa22f4402a1400cb258ed3029da240ae36981cf
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/engine/renderer/tr_shade.cpp
@@ -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 ] );

0 comments on commit 8aa22f4

Please sign in to comment.
You can’t perform that action at this time.