Skip to content

Commit

Permalink
Fix rendering special materials(like portals) in shadow maps
Browse files Browse the repository at this point in the history
  • Loading branch information
SaiyansKing committed Dec 14, 2023
1 parent 986c8ff commit ee7f23e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions D3D11Engine/D3D11GraphicsEngine.cpp
Expand Up @@ -3380,7 +3380,7 @@ void XM_CALLCONV D3D11GraphicsEngine::DrawWorldAround(
if ( meshInfoByKey->first.Material && meshInfoByKey->first.Material->GetTexture() ) {
// Check surface type

if ( meshInfoByKey->first.Info->MaterialType == MaterialInfo::MT_Water ) {
if ( meshInfoByKey->first.Info->MaterialType != MaterialInfo::MT_None ) {
continue;
}

Expand Down Expand Up @@ -3422,7 +3422,7 @@ void XM_CALLCONV D3D11GraphicsEngine::DrawWorldAround(
for ( auto&& meshInfoByKey = section.WorldMeshes.begin();
meshInfoByKey != section.WorldMeshes.end(); ++meshInfoByKey ) {
// Check surface type
if ( meshInfoByKey->first.Info->MaterialType == MaterialInfo::MT_Water ) {
if ( meshInfoByKey->first.Info->MaterialType != MaterialInfo::MT_None ) {
continue;
}

Expand Down Expand Up @@ -3712,7 +3712,7 @@ void XM_CALLCONV D3D11GraphicsEngine::DrawWorldAround( FXMVECTOR position,
} else {
for ( const auto& it : section.WorldMeshes ) {
// Check surface type
if ( it.first.Info->MaterialType == MaterialInfo::MT_Water ) {
if ( it.first.Info->MaterialType != MaterialInfo::MT_None ) {
continue;
}

Expand Down

0 comments on commit ee7f23e

Please sign in to comment.