Displays lines of the same thickness regardless of their position in 3d space, taking into account hiding by other geometry

Hi. How to keep the thickness of the lines (fat lines)?
Not like that:

but like:


?

Not geometry, but shader, maybe?

Hi!
Have a look at this topic: How to render full outlines as a post process - tutorial

Thanks. But I am trying to achieve this effect for real lines (geometry). Is it possible?

and later, when you’ve been provided with an approach of postprocessing (shaders)

What do you want actually?

Lines (with geometry in the scene, like three.js webgl - lines - fat) that have the same thickness at any position in space, at any angle of view of the camera.

Now, if the line is 4 pixels thick, but is on the far edge of the cube, it is, as it were, hidden by the surface. Therefore, its apparent thickness is not 4 pixels, but ~2.

Yeah, I got what you mean.
Postprocessing has to help :thinking: I’ve got no better idea.

But how exactly? For example, how is just to draw all straight lines “on top” of the current view?

The way how it’s done in the topic provided earlier.

I mean not to find lines on an already rendered image and draw them, but to draw lines that are physically placed in the scene (have xyz coordinates).

Is it possible to determine which line pixels can be seen by the camera? Considering that a line placed on an edge should be visible if this edge is visible.

Clear lines of the same thickness are typical for CAD packages, for example.

The closest I can recall of is this: How to offset LineSegmentsGeometry in shader?