SF Simple Lit
In order to achieve the stealth effect there are some requirements for the original object.
To summarize the shader requirements in short:
Surface Type: Transparent
Depth Write: ForceEnabled
Depth Test: LEqual
For those who are interested into a more detailed explanation:
Since the original object and the stealth object will be overlapping to achieve the stealth dissolve effect, we need to ensure that the original object has a transparent material assigned. This will ensure that the Stealth shader actually renders the real background,and not just the original object.
Since rendering complex transparent objects may have some visual impacts, like seeing stuff through the rendered object I introduced a simple Lit shader that addresses this issue. You can still specify the basic textures, like base, metal, normal and emission textures.
The only difference to the built-in URP Lit shader is that you are able to modify the Depth Write and Depth test property. Based on these settings you should be able to render objects with the transparent surface type that are still looking like opaque objects.
You should be able to use any shader that has the Depth Write and Depth Test properties specified correctly for the original object.
Last updated