Skip to content

Commit

Permalink
Fix cross xhair off-by-1 coordinates
Browse files Browse the repository at this point in the history
  • Loading branch information
louistakepillz committed Jan 15, 2019
1 parent eb50e8f commit 0233204
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion shaders/xhair.fx
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ float4 PS_Xhair(float4 pos : SV_Position, float2 texcoord : TEXCOORD) : SV_Targe
return drawBackground;
}

float2 center = float2((BUFFER_WIDTH / 2) - 1 + OffsetX, (BUFFER_HEIGHT / 2) - 1 + OffsetY);
float2 center = float2((BUFFER_WIDTH / 2) + OffsetX, (BUFFER_HEIGHT / 2) + OffsetY);

int distX = abs(center.x - pos.x);
int distY = abs(center.y - pos.y);
Expand Down

0 comments on commit 0233204

Please sign in to comment.