Skip to content
Permalink
Browse files

debugging: implement r_showMaterialMaps

  • Loading branch information
illwieckz committed Dec 29, 2019
1 parent 6792a33 commit 8d05a509e95a442188c76af1a6498f0e33fadf09
@@ -558,6 +558,11 @@ static std::string GenEngineConstants() {
AddDefine( str, "r_showNormalMaps", 1 );
}

if ( r_showMaterialMaps->integer )
{
AddDefine( str, "r_showMaterialMaps", 1 );
}

if ( glConfig2.vboVertexSkinningAvailable )
{
AddDefine( str, "r_VertexSkinning", 1 );
@@ -111,5 +111,7 @@ void main()
// convert normal to [0,1] color space
normal = normal * 0.5 + 0.5;
outputColor = vec4(normal, 1.0);
#elif defined(r_showMaterialMaps)
outputColor = material;
#endif
}
@@ -146,5 +146,7 @@ void main()
// convert normal to [0,1] color space
normal = normal * 0.5 + 0.5;
outputColor = vec4(normal, 1.0);
#elif defined(r_showMaterialMaps)
outputColor = material;
#endif
}
@@ -118,5 +118,7 @@ void main()
// convert normal to [0,1] color space
normal = normal * 0.5 + 0.5;
outputColor = vec4(normal, 1.0);
#elif defined(r_showMaterialMaps)
outputColor = material;
#endif
}
@@ -228,6 +228,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
cvar_t *r_showLightMaps;
cvar_t *r_showDeluxeMaps;
cvar_t *r_showNormalMaps;
cvar_t *r_showMaterialMaps;
cvar_t *r_showAreaPortals;
cvar_t *r_showCubeProbes;
cvar_t *r_showBspNodes;
@@ -1305,6 +1306,7 @@ ScreenshotCmd screenshotPNGRegistration("screenshotPNG", ssFormat_t::SSF_PNG, "p
r_showLightMaps = ri.Cvar_Get( "r_showLightMaps", "0", CVAR_CHEAT | CVAR_LATCH );
r_showDeluxeMaps = ri.Cvar_Get( "r_showDeluxeMaps", "0", CVAR_CHEAT | CVAR_LATCH );
r_showNormalMaps = ri.Cvar_Get( "r_showNormalMaps", "0", CVAR_CHEAT | CVAR_LATCH );
r_showMaterialMaps = ri.Cvar_Get( "r_showMaterialMaps", "0", CVAR_CHEAT | CVAR_LATCH );
r_showAreaPortals = ri.Cvar_Get( "r_showAreaPortals", "0", CVAR_CHEAT );
r_showCubeProbes = ri.Cvar_Get( "r_showCubeProbes", "0", CVAR_CHEAT );
r_showBspNodes = ri.Cvar_Get( "r_showBspNodes", "0", CVAR_CHEAT );
@@ -2955,6 +2955,7 @@ static inline void halfToFloat( const f16vec4_t in, vec4_t out )
extern cvar_t *r_showLightMaps; // render lightmaps only
extern cvar_t *r_showDeluxeMaps;
extern cvar_t *r_showNormalMaps;
extern cvar_t *r_showMaterialMaps;
extern cvar_t *r_showAreaPortals;
extern cvar_t *r_showCubeProbes;
extern cvar_t *r_showBspNodes;

0 comments on commit 8d05a50

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