Skip to content

Commit 1e47402

Browse files
authored
Merge pull request mapbase-source#60 from RoyaleNoir/shadow-fix
Fix hardware shadow filtering
2 parents 0d8eb2e + 8cff02f commit 1e47402

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sp/src/game/client/clientshadowmgr.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1494,7 +1494,8 @@ void CClientShadowMgr::InitDepthTextureShadows()
14941494
#else
14951495
#if defined(MAPBASE) //&& !defined(ASW_PROJECTED_TEXTURES)
14961496
// SAUL: we want to create a *DEPTH TEXTURE* of specific size, so use RT_SIZE_NO_CHANGE and MATERIAL_RT_DEPTH_ONLY
1497-
depthTex.InitRenderTarget( m_nDepthTextureResolution, m_nDepthTextureResolution, RT_SIZE_NO_CHANGE, dstFormat, MATERIAL_RT_DEPTH_ONLY, false, strRTName );
1497+
// However, MATERIAL_RT_DEPTH_ONLY forces point filtering to be enabled which negatively affect PCF, so the standard MATERIAL_RT_DEPTH_NONE works better.
1498+
depthTex.InitRenderTarget( m_nDepthTextureResolution, m_nDepthTextureResolution, RT_SIZE_NO_CHANGE, dstFormat, MATERIAL_RT_DEPTH_NONE, false, strRTName );
14981499
#else
14991500
depthTex.InitRenderTarget( m_nDepthTextureResolution, m_nDepthTextureResolution, RT_SIZE_OFFSCREEN, dstFormat, MATERIAL_RT_DEPTH_NONE, false, strRTName );
15001501
#endif

0 commit comments

Comments
 (0)