I have a standard 3d camera/projection/model setup that renders rectangles with a WebGL shader.
Users can zoom out and fly anywhere.
I want to make sure that regardless of the scale, width of the rendered rectangles is a constant value (e.g. 2 pixels).
What is the most efficient way to do so?
This is very similar to SVG's non-scaling-stroke vector effect: https://www.w3.org/TR/SVGTiny12/painting.html#NonScalingStroke