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

optimize GetOutlineCameraFovAndDistanceFixMultiplier #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

benzngf
Copy link

@benzngf benzngf commented Jul 12, 2021

In some extreme conditions(eg. Very small FOV), the original GetOutlineCameraFovAndDistanceFixMultiplier will become too thin.
Also, the atan() function to get FOV is actually unnecessary in this use case. (Mutiplying outline width directly to FOV is not really correct to preserve line width)
I've included the math into the comments of the .hlsl file, please review this optimization, thank you!

@benzngf
Copy link
Author

benzngf commented Jul 12, 2021

Hi, I've attached some gifs for you to review ( notice the outline width )
Before
↑Before modification
After
↑After modification

@ColinLeung-NiloCat
Copy link
Owner

Thank you! I will study this change and maybe merge the pull request directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants