From ec846716f6c639528a635f31e60ebc28cba4d53f Mon Sep 17 00:00:00 2001 From: Ion Agorria Date: Wed, 30 Oct 2024 21:30:59 +0100 Subject: [PATCH] sokol: Set alphatest to fix shadow texture outlines --- Source/Render/src/cCamera.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Source/Render/src/cCamera.cpp b/Source/Render/src/cCamera.cpp index 7574a562..137fb31d 100644 --- a/Source/Render/src/cCamera.cpp +++ b/Source/Render/src/cCamera.cpp @@ -107,6 +107,7 @@ void cCamera::DrawScene() RenderDevice->FlushPrimitive3D(); RenderDevice->SetRenderState(RS_ZFUNC,CMP_LESSEQUAL); RenderDevice->SetRenderState(RS_BILINEAR,true); + RenderDevice->SetRenderState(RS_ALPHA_TEST_MODE, ALPHATEST_GT_0); } std::vector::iterator it_c; @@ -150,8 +151,9 @@ void cCamera::DrawScene() RenderDevice->SetRenderState(RS_ZWRITEENABLE, true); uint32_t fogenable = RenderDevice->GetRenderState(RS_FOGENABLE); - if(GetAttribute(ATTRCAMERA_SHADOW|ATTRCAMERA_SHADOWMAP|ATTRCAMERA_SHADOW_STRENCIL)) - RenderDevice->SetRenderState(RS_FOGENABLE,false); + if(GetAttribute(ATTRCAMERA_SHADOW|ATTRCAMERA_SHADOWMAP|ATTRCAMERA_SHADOW_STRENCIL)) { + RenderDevice->SetRenderState(RS_FOGENABLE, false); + } // if(GetAttribute(ATTRCAMERA_ZMINMAX)) // {