The “Tree Soft Occlusion Leaves” shader doesn’t write to _CameraDepthTexture (the leaves do not show up when another shader displays the depth texture). Is there any way to get this shader to write to the depth texture if alpha is beyond a certain threshhold?
I found a way to do it, but I’d like some guidance on whether it’ll cause other problems: setting the material’s renderqueue to 2500 (or below) solves the problem, since the manual says anything in that range will be rendered into the depth texture; but I assume there’s a reason why the Tree Soft Occlusion Leaves shader is designed to use Transparent-99. It seems to work so far, but what problems will be caused by changing the renderqueue?
Is there another way to do it? Would using a shadow pass or fallback shader with a shadow pass solve the problem without causing other problems?
I bet you’d get some actual answers if you asked in the forum with all the shader experts.
2 Likes