I'm trying to implement a grass shader into my URP project. My atmosphere is implemented as a post-processing effect, sampling the camera's depth texture. However, my grass does not appear to be getting written into the camera's depth texture, causing the atmosphere to appear on top of the grass. I've enabled a shadow pass on the grass shader and ensured it is being rendered in the Opaque queue (2000). I've tried a number of approaches based on a few tutorials, the below images show an implementation of Daniel Ilett's excellent stylised grass tutorial on youtube. Image of the grass showing the atmosphere being drawn over the top: The depth texture from the same view showing the object is not rendering to it: Any help would be appreciated, I feel like I've tried everything. If it helps, the geometry shader code is here: https://pastebin.com/x9f0e7Cp
AFAIK URP doesn't use a "LightMode" = "ShadowCaster" pass for the depth texture anymore. The URP shader has a Depth Only and Depth Normals pass for each shader used for the camera depth texture and normal texture. https://github.com/Unity-Technologi...render-pipelines.universal/Shaders/Lit.shader
bgolus - you're a genius. I had found and tried the Depth Only pass, but it was the Depth Normals pass that did the trick. Thanks!