Skip to content

Commit

Permalink
Make a temporary tweak to the zbias code, we really need a better met…
Browse files Browse the repository at this point in the history
…hod of doing this.
  • Loading branch information
death-droid committed Oct 18, 2012
1 parent 56e3dc0 commit 293cf90
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
8 changes: 4 additions & 4 deletions Render/DirectX/D3DRender.cpp
Expand Up @@ -226,11 +226,11 @@ bool D3DRender::RenderFillRect(uint32 dwColor, float depth)
void ApplyZBias(uint32 bias) //FIXME
{
//We should be calculating the actual offsets
float f1 = bias > 0 ? -0.002f : 0.0f;
float f2 = bias > 0 ? 1.0f : 0.0f;
float f1 = bias > 0 ? -0.00075f : 0.0f;
float f2 = bias > 0 ? 0.0f : 0.0f;
// Change by the bias
// gD3DDevWrapper.SetRenderState(D3DRS_DEPTHBIAS,*(DWORD*)(&f1));
//gD3DDevWrapper.SetRenderState(D3DRS_SLOPESCALEDEPTHBIAS, *(DWORD*)(&f2));
gD3DDevWrapper.SetRenderState(D3DRS_DEPTHBIAS,*(DWORD*)(&f1));
gD3DDevWrapper.SetRenderState(D3DRS_SLOPESCALEDEPTHBIAS, *(DWORD*)(&f2));
}

void D3DRender::SetZBias(int bias)
Expand Down
1 change: 0 additions & 1 deletion Render/DirectX/D3DRenderExt.cpp
Expand Up @@ -224,7 +224,6 @@ LPD3DXSPRITE D3DRender::InitSpriteDraw(void)
d3dSprite->Release();
return NULL;
}
return NULL;
}


Expand Down

0 comments on commit 293cf90

Please sign in to comment.