0 votes

In many 3d games (like Overwatch, Cyberpunk 2077, Halo, Apex Legends) you can get a outline and tint overlay of important mesh objects.
In Halo for example enemies are drawn red, friendlies and items blue, special items gold.


The outline and tinted overlay are drawn on top of everything else and also have an alpha so you can see the meshes and material behind it.
These outline and tinted overlays also only should appear when specific criteria is for example the mesh objects are within a specific area or within distance to something.
How do you do this in godot?
An example project would be appreciated.

Godot version 3
in Engine by (105 points)

Take a look there :
https://godotshaders.com/?s=outline

I tried to do this, but I can't pass the limitations. Outline behind wall can be acieved by rendermode depthtest_never, but it can only be true or false, I don't know how to apply uniform conditions for it. It propably requires overriding DEPTH inside shader

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.