You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
// vertex shader
float t = u_thickness*currentProjected.w;
// fragment, if you do your own anti-aliasing in fragment shader
float t = u_thickness/gl_FragCoord.w;
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
The text was updated successfully, but these errors were encountered: