Skip to content

Commit ec84671

Browse files
committed
sokol: Set alphatest to fix shadow texture outlines
1 parent 262699a commit ec84671

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Source/Render/src/cCamera.cpp

+4-2
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ void cCamera::DrawScene()
107107
RenderDevice->FlushPrimitive3D();
108108
RenderDevice->SetRenderState(RS_ZFUNC,CMP_LESSEQUAL);
109109
RenderDevice->SetRenderState(RS_BILINEAR,true);
110+
RenderDevice->SetRenderState(RS_ALPHA_TEST_MODE, ALPHATEST_GT_0);
110111
}
111112

112113
std::vector<cCamera*>::iterator it_c;
@@ -150,8 +151,9 @@ void cCamera::DrawScene()
150151
RenderDevice->SetRenderState(RS_ZWRITEENABLE, true);
151152

152153
uint32_t fogenable = RenderDevice->GetRenderState(RS_FOGENABLE);
153-
if(GetAttribute(ATTRCAMERA_SHADOW|ATTRCAMERA_SHADOWMAP|ATTRCAMERA_SHADOW_STRENCIL))
154-
RenderDevice->SetRenderState(RS_FOGENABLE,false);
154+
if(GetAttribute(ATTRCAMERA_SHADOW|ATTRCAMERA_SHADOWMAP|ATTRCAMERA_SHADOW_STRENCIL)) {
155+
RenderDevice->SetRenderState(RS_FOGENABLE, false);
156+
}
155157

156158
// if(GetAttribute(ATTRCAMERA_ZMINMAX))
157159
// {

0 commit comments

Comments
 (0)