Skip to content

Commit

Permalink
DX9 typo fix in PackDepthBuffer
Browse files Browse the repository at this point in the history
  • Loading branch information
hrydgard committed Feb 12, 2017
1 parent 3282019 commit 142b308
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion GPU/Directx9/FramebufferDX9.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -982,7 +982,7 @@ static void DXSetViewport(float x, float y, float w, float h, float minZ, float
// TODO: Optimize.
for (int yp = 0; yp < h; ++yp) {
for (int xp = 0; xp < w; ++xp) {
const int offset = (yp + y) & vfb->z_stride + x + xp;
const int offset = (yp + y) * vfb->z_stride + x + xp;

float scaled = FromScaledDepth((packed[offset] & 0x00FFFFFF) * (1.0f / 16777215.0f));
if (scaled <= 0.0f) {
Expand Down

0 comments on commit 142b308

Please sign in to comment.