Skip to content

Commit

Permalink
Fix half pixel offset regression in old renderer
Browse files Browse the repository at this point in the history
  • Loading branch information
rafalh committed Sep 3, 2024
1 parent 7b156f9 commit 7e0a76a
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions game_patch/graphics/legacy/gr_d3d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -681,11 +681,6 @@ void gr_d3d_bitmap_float(int bitmap_handle, float x, float y, float w, float h,
float sy_top = rf::gr::screen.offset_y + y;
float sy_bottom = rf::gr::screen.offset_y + y + h;

sx_left -= 0.5f;
sx_right -= 0.5f;
sy_top -= 0.5f;
sy_bottom -= 0.5f;

float u_left = sx / bm_w * (flip_x ? -1.0f : 1.0f);
float u_right = (sx + sw) / bm_w * (flip_x ? -1.0f : 1.0f);
float v_top = sy / bm_h * (flip_y ? -1.0f : 1.0f);
Expand Down

0 comments on commit 7e0a76a

Please sign in to comment.