notpeelz / reshade-xhair

A customizable, fullscreen-compatible crosshair overlay for ReShade
GNU General Public License v3.0
224 stars 52 forks source link

Request to Add Outline to the Inner Part of Cross Xhair as Well #12

Open PhoebusXS opened 3 years ago

PhoebusXS commented 3 years ago

Hi, could you please add an option to draw outline at all four sides of each reticle? Right now the inner part of my cross type xhair doesn't have outline and looks kind of weird compare to other games that I play. Thanks!!

PhoebusXS commented 3 years ago

Anyways, I just come up with these changes for it to suit my purpose. You can use these codes and add a switch, but I don't need one, so I'll just use this hard coded version that draws inner outlines.

All I have to do is make some changes around isXhairPixel = ... in xhair.fx:

For Vertical Pixel (line 410):

 bool isXhairPixel = int(round(min(
  max((CrossThickness * 2.0) - absDistX, 0) / max(CrossThickness * 2.0, 1),
  min(
    max(BareCrossLength - absDistY, 0),
    max(absDistY - CrossGap + 1, 0)
  )
))) == 1;

For Horizontal Pixel (line 463):

bool isXhairPixel = int(round(min(
  max((CrossThickness * 2.0) - absDistY, 0) / max(CrossThickness * 2.0, 1),
  min(
    max(BareCrossLength - absDistX, 0),
    max(absDistX - CrossGap + 1, 0)
  )
))) == 1;
notpeelz commented 3 years ago

Hey! Sorry for the late reply. I've been busy lately and hadn't gotten around to replying yet.

Thanks for the code snippet, I'll look into it when I have some time.