|
|
@ -1038,7 +1038,7 @@ bool Map_CheckForHDR( model_t *pModel, const char *pLoadName ) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
bool bEnableHDR = ( IsX360() && bHasHDR ) || |
|
|
|
bool bEnableHDR = ( IsX360() && bHasHDR ) || |
|
|
|
( bHasHDR && ( mat_hdr_level.GetInt() >= 2 ) && |
|
|
|
( bHasHDR && |
|
|
|
( g_pMaterialSystemHardwareConfig->GetDXSupportLevel() >= 90 ) ); |
|
|
|
( g_pMaterialSystemHardwareConfig->GetDXSupportLevel() >= 90 ) ); |
|
|
|
|
|
|
|
|
|
|
|
EnableHDR( bEnableHDR ); |
|
|
|
EnableHDR( bEnableHDR ); |
|
|
@ -1856,7 +1856,7 @@ void Mod_LoadFaces( void ) |
|
|
|
int ti, di; |
|
|
|
int ti, di; |
|
|
|
|
|
|
|
|
|
|
|
int face_lump_to_load = LUMP_FACES; |
|
|
|
int face_lump_to_load = LUMP_FACES; |
|
|
|
if ( CMapLoadHelper::LumpSize( LUMP_FACES_HDR ) > 0 ) |
|
|
|
if ( g_pMaterialSystemHardwareConfig->GetHDREnabled() && CMapLoadHelper::LumpSize( LUMP_FACES_HDR ) > 0 ) |
|
|
|
{ |
|
|
|
{ |
|
|
|
face_lump_to_load = LUMP_FACES_HDR; |
|
|
|
face_lump_to_load = LUMP_FACES_HDR; |
|
|
|
} |
|
|
|
} |
|
|
@ -2288,7 +2288,7 @@ void Mod_LoadLeafs( void ) |
|
|
|
Mod_LoadLeafs_Version_0( lh ); |
|
|
|
Mod_LoadLeafs_Version_0( lh ); |
|
|
|
break; |
|
|
|
break; |
|
|
|
case 1: |
|
|
|
case 1: |
|
|
|
if( CMapLoadHelper::LumpSize( LUMP_LEAF_AMBIENT_LIGHTING_HDR ) > 0 ) |
|
|
|
if( g_pMaterialSystemHardwareConfig->GetHDREnabled() && CMapLoadHelper::LumpSize( LUMP_LEAF_AMBIENT_LIGHTING_HDR ) > 0 ) |
|
|
|
{ |
|
|
|
{ |
|
|
|
CMapLoadHelper mlh( LUMP_LEAF_AMBIENT_LIGHTING_HDR ); |
|
|
|
CMapLoadHelper mlh( LUMP_LEAF_AMBIENT_LIGHTING_HDR ); |
|
|
|
CMapLoadHelper mlhTable( LUMP_LEAF_AMBIENT_INDEX_HDR ); |
|
|
|
CMapLoadHelper mlhTable( LUMP_LEAF_AMBIENT_INDEX_HDR ); |
|
|
@ -2383,7 +2383,7 @@ void Mod_LoadCubemapSamples( void ) |
|
|
|
lh.GetMap()->m_pCubemapSamples = out; |
|
|
|
lh.GetMap()->m_pCubemapSamples = out; |
|
|
|
lh.GetMap()->m_nCubemapSamples = count; |
|
|
|
lh.GetMap()->m_nCubemapSamples = count; |
|
|
|
|
|
|
|
|
|
|
|
bool bHDR = true; //g_pMaterialSystemHardwareConfig->GetHDRType() != HDR_TYPE_NONE;
|
|
|
|
bool bHDR = g_pMaterialSystemHardwareConfig->GetHDREnabled(); //g_pMaterialSystemHardwareConfig->GetHDRType() != HDR_TYPE_NONE;
|
|
|
|
int nCreateFlags = bHDR ? 0 : TEXTUREFLAGS_SRGB; |
|
|
|
int nCreateFlags = bHDR ? 0 : TEXTUREFLAGS_SRGB; |
|
|
|
|
|
|
|
|
|
|
|
// We have separate HDR versions of the textures. In order to deal with this,
|
|
|
|
// We have separate HDR versions of the textures. In order to deal with this,
|
|
|
@ -4451,7 +4451,7 @@ void CModelLoader::Map_LoadModel( model_t *mod ) |
|
|
|
|
|
|
|
|
|
|
|
// Until BSP version 19, this must occur after loading texinfo
|
|
|
|
// Until BSP version 19, this must occur after loading texinfo
|
|
|
|
COM_TimestampedLog( " Mod_LoadLighting" ); |
|
|
|
COM_TimestampedLog( " Mod_LoadLighting" ); |
|
|
|
if ( CMapLoadHelper::LumpSize( LUMP_LIGHTING_HDR ) > 0 ) |
|
|
|
if ( g_pMaterialSystemHardwareConfig->GetHDREnabled() && CMapLoadHelper::LumpSize( LUMP_LIGHTING_HDR ) > 0 ) |
|
|
|
{ |
|
|
|
{ |
|
|
|
CMapLoadHelper mlh( LUMP_LIGHTING_HDR ); |
|
|
|
CMapLoadHelper mlh( LUMP_LIGHTING_HDR ); |
|
|
|
Mod_LoadLighting( mlh ); |
|
|
|
Mod_LoadLighting( mlh ); |
|
|
@ -4543,7 +4543,7 @@ void CModelLoader::Map_LoadModel( model_t *mod ) |
|
|
|
&m_worldBrushData.m_nAreas ); |
|
|
|
&m_worldBrushData.m_nAreas ); |
|
|
|
|
|
|
|
|
|
|
|
COM_TimestampedLog( " Mod_LoadWorldlights" ); |
|
|
|
COM_TimestampedLog( " Mod_LoadWorldlights" ); |
|
|
|
if ( CMapLoadHelper::LumpSize( LUMP_WORLDLIGHTS_HDR ) > 0 ) |
|
|
|
if ( g_pMaterialSystemHardwareConfig->GetHDREnabled() && CMapLoadHelper::LumpSize( LUMP_WORLDLIGHTS_HDR ) > 0 ) |
|
|
|
{ |
|
|
|
{ |
|
|
|
CMapLoadHelper mlh( LUMP_WORLDLIGHTS_HDR ); |
|
|
|
CMapLoadHelper mlh( LUMP_WORLDLIGHTS_HDR ); |
|
|
|
Mod_LoadWorldlights( mlh, true ); |
|
|
|
Mod_LoadWorldlights( mlh, true ); |
|
|
|