Skip to content

Commit

Permalink
sokol: Set alphatest to fix shadow texture outlines
Browse files Browse the repository at this point in the history
  • Loading branch information
IonAgorria committed Oct 30, 2024
1 parent 262699a commit ec84671
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Source/Render/src/cCamera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<cCamera*>::iterator it_c;
Expand Down Expand Up @@ -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))
// {
Expand Down

0 comments on commit ec84671

Please sign in to comment.