I need your help regarding Shaders, I am completely new to Shaders, but I am going to learn it soon. Can someone enlighten me on how I can make a shader that looks transparent but behave like opaque. I just need to understand the concept on how I can achieve it, so I can start my researching.
I am actually a custom content creator for a game. Cant be considered a modder because we have no access to writing code for the game. Hence, I am trying to write a Shader to achieve that behaviour without adding scripts. Basically, I cant touch the player model of the game, hence I cant simply change its alpha. I can only add material to the armour I am making, hence I have the shader idea. Basically what this shader would do, is to cover up the player model even if the armor looks transparent.
Thanks for your time, hope to hear some suggestion soon.
You want the armor to be transparent such that it shows the world, but not the character model?
That will require far more than a shader on the armor. It requires explicit control over the order in which the environment, armor and character get rendered. What you want is a surprisingly difficult thing to get right and requires multiple stencil and/or depth only rendering passes. Doing this all purely in a shader for the armor is simply not possible.
Thanks for the quick reply . Yes, I want it to show the world, but covers the player. It is made as a stealth armour. Is there any other ways I can achieve it? As long as I can get the stealth effect with just a shader
It requires more control than a shader on a single part is capable of.
The most basic way I can think of to do this would be by using a “depth pre pass” alpha shader on both the character and the armor. If you’re lucky Unity will run the depth prepass on both meshes before the second two passes, but they you do need to use the exact same shader on both parts.