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

Fix for edge width artifact caused by the perspective #1

Open
filipinascimento opened this issue Jan 31, 2022 · 1 comment
Open

Fix for edge width artifact caused by the perspective #1

filipinascimento opened this issue Jan 31, 2022 · 1 comment
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed low priority
Milestone

Comments

@filipinascimento
Copy link
Owner

A fix is needed for rendering edges.

Screen Shot 2022-01-31 at 3 26 26 PM Screen Shot 2022-01-31 at 3 26 30 PM

As shown in the image, if the position of start and end are similar relative to the camera Right and Up vectors (XY on the view coordinates), it reduces the edge width depending on the angle of view. This is caused by the perspective transformation that happens after projection as objects with similar positions in XY in the view coordinates can still be placed in different positions after perspective correction.

Currently, the viewMatrix is being multiplied to the displacement vector to be written in camera right and up coordinates (see Shaders/edges.js )

I'm not sure how to fix that without doing all the perspective calculations in the shader.

@filipinascimento filipinascimento self-assigned this Jan 31, 2022
@filipinascimento filipinascimento added this to the Arcadia milestone Jan 31, 2022
@filipinascimento filipinascimento added bug Something isn't working low priority help wanted Extra attention is needed labels Jan 31, 2022
@filipinascimento
Copy link
Owner Author

filipinascimento added a commit that referenced this issue Oct 19, 2023
- Edges now use perspective corrected projection.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed low priority
Projects
Status: Todo
Development

No branches or pull requests

1 participant