Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
PhoebusXS opened this issue May 8, 2021 · 2 comments
Open
Labels
enhancement New feature or request

Comments

@PhoebusXS
Copy link

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
Copy link
Author

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
Copy link
Owner

notpeelz commented May 12, 2021

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.

@notpeelz notpeelz added the enhancement New feature or request label May 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants