- Home /
Volume absorption area
I want to make it so that from a certain point, everything below gets darker and darker, kind of like a void. I'm thinking something like a volume absorption shader, except that would kill devices. How can I make this type of void?
Answer by tanoshimi · Aug 08, 2016 at 04:17 PM
I'd do it using a shader that lerped towards black (or whatever colour you want your void to be) based on increasingly negative y coordinate of the pixel as measured in world space.
That sounds good!... Except I have no knowledge creating shaders whatsoever. Could you help me/link me to a guide?
Also, would this work depending on how close the camera is? Ideally, players fall in and just fade out of view
If you want it done in view space, just look at the "Linear Fog" example at https://docs.unity3d.com/$$anonymous$$anual/SL-SurfaceShaderExamples.html . If you want world space, combine with the code from the "Slices via World Position" example.
Your answer
![](https://koobas.hobune.stream/wayback/20220612090411im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Culling part of a sprite in Sprite Manager 2 1 Answer
How to remove URP from the project 0 Answers
The Best Way To Make Stylised Grass in Unity? 0 Answers
Adding a clip() to the default shader? 0 Answers