`outlineWidth` independent of distance to camera

Is there a build-in way to render an outline (via mesh.renderOutline = true) of a constant width, regardless of the distance to the camera (probably not — or I’m just blind). If I were to build this by myself, probably the way to go would be to calculate and map the distance in an onViewMatrixChangedObservable observable?

Figured it out by myself after I posted yesterday, it’s pretty easy. Here’s a playground for anyone who might be interested:

3 Likes