Skip to content

Commit

Permalink
Merge pull request #60 from RoyaleNoir/shadow-fix
Browse files Browse the repository at this point in the history
Fix hardware shadow filtering
  • Loading branch information
Blixibon committed Nov 22, 2020
2 parents dbd583b + 0b5a0c8 commit 3b5b3a9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sp/src/game/client/clientshadowmgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1494,7 +1494,8 @@ void CClientShadowMgr::InitDepthTextureShadows()
#else
#if defined(MAPBASE) //&& !defined(ASW_PROJECTED_TEXTURES)
// SAUL: we want to create a *DEPTH TEXTURE* of specific size, so use RT_SIZE_NO_CHANGE and MATERIAL_RT_DEPTH_ONLY
depthTex.InitRenderTarget( m_nDepthTextureResolution, m_nDepthTextureResolution, RT_SIZE_NO_CHANGE, dstFormat, MATERIAL_RT_DEPTH_ONLY, false, strRTName );
// However, MATERIAL_RT_DEPTH_ONLY forces point filtering to be enabled which negatively affect PCF, so the standard MATERIAL_RT_DEPTH_NONE works better.
depthTex.InitRenderTarget( m_nDepthTextureResolution, m_nDepthTextureResolution, RT_SIZE_NO_CHANGE, dstFormat, MATERIAL_RT_DEPTH_NONE, false, strRTName );
#else
depthTex.InitRenderTarget( m_nDepthTextureResolution, m_nDepthTextureResolution, RT_SIZE_OFFSCREEN, dstFormat, MATERIAL_RT_DEPTH_NONE, false, strRTName );
#endif
Expand Down

0 comments on commit 3b5b3a9

Please sign in to comment.