mattdesl / three-line-2d

lines expanded in a vertex shader
MIT License
235 stars 34 forks source link

Can we change projection into lineMesh using the vertex shader for prespective camera? #2

Open koolkap opened 8 years ago

koolkap commented 8 years ago

Right now we calculate the extrusion into the vertex shader based on the normal and milter + thickness and apply to the position attribute. Since in one of you demo you used direct mat4.ortho for projection I am curious can this be done directly into the vertex shader without changing the prespective matrix.

So like this getNormal(path,{closed: true,directionFacing: true});