Quick 'n dirty implementation of an additional render mode where the shape behaves like a regular 3D object but the stroke always faces the camera.
The existing modes didn't work for me because I needed the stroke to scale with distance from the camera but still wanted the nice non-perspective stroke rendering.
This is done by first converting the stroke to view-space (multiply by MV), extruding it and then doing the projection last (multiply by P).
This is pretty rough, I haven't tested it with fills, implemented only the shader part and didn't add the mode to the CPU renderer. The result without any modifications to the CPU renderer was already close enough so I didn't look into a proper implementation.
Quick 'n dirty implementation of an additional render mode where the shape behaves like a regular 3D object but the stroke always faces the camera.
The existing modes didn't work for me because I needed the stroke to scale with distance from the camera but still wanted the nice non-perspective stroke rendering.
This is done by first converting the stroke to view-space (multiply by MV), extruding it and then doing the projection last (multiply by P).
This is pretty rough, I haven't tested it with fills, implemented only the shader part and didn't add the mode to the CPU renderer. The result without any modifications to the CPU renderer was already close enough so I didn't look into a proper implementation.