mattdesl / mattdesl/webgl-lines
Perspective not corrected
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 435
- Forks
- 37
- PR merge metrics
- No merged PRs in 30d
Description
I checked out your code, adapted to my purposes, and noticed that the perspective doesn't seem to be corrected in the vertex shader. The lines further away from camera are indeed getting thinner. I then cloned your repo, played a bit with the view and projection matrices, and noticed that it does the same thing. Any idea what's going on and how to correct for perspective and have lines with constant width?

Also, my code is here https://github.com/skrat/webgl-line-rendering
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by inspecting the vertex shader and the handling of the view and projection matrices in the repository. Reproduce the reported behavior with the supplied perspective setup and compare it with the linked example. Done means perspective is corrected so lines retain constant width as they move farther from the camera.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100