Wednesday, April 17, 2019

graphics - How'd they do it: TF2 payload cart glow?


How did the creators of TF2 make the glow on the payload cart visible through walls? Is it possible to implement this in Unity's shaderlab?




Answer



To make a shader that only draws when occluded by other geometry, use ZTest Greater. To always draw, use ZTest Always. Ensure your shader is late in the render queue. The glow itself is a different problem, personally I like rim lighting effects for such things - like inner glow rather than outer glow.


No comments:

Post a Comment

Simple past, Present perfect Past perfect

Can you tell me which form of the following sentences is the correct one please? Imagine two friends discussing the gym... I was in a good s...