Render Overlay Material Behind Main Mesh/Material?

Godot Version

4.3

Question

Hello! I am currently trying to create an outline for 3D objects in my scenes, the first-suggested solution (create an material overlay, add a small Grow, and give it front-face-culling) is about 80% there. However, this causes the outline of parts of the model to obscure other parts of the model, which is more complicated areas looks jagged and nasty (see below)
Screenshot 2024-12-17 105102

Is there a way to have this overlay material always render behind the main material of the mesh? That way it would form an outline of the sillouette, rather than a line around all edges of the model itself.

1 Like

Iā€™m also looking for a way to draw it behind the mesh! Have you made any progress since posting?

It would seem like you could just reverse the materials, make the glow material the base, then the main material the overlay?

If not probably want to look into the next pass feature set with the standard materials lower on the page Standard Material 3D and ORM Material 3D ā€” Godot Engine (stable) documentation in English