I want to know how did ZED unity SDK capture the shadowmap texture to ZED_Forward_Lighting.shader,so I reference the ZEDRenderingPlane.cs,and found those in line 1134:
if (light.commandBufferCount == 0)
{
CommandBuffer lightBuffer = new CommandBuffer();
lightBuffer.name = “ZED_Copy_ShadowMap”;
lightBuffer.SetGlobalTexture("_DirectionalShadowMap", BuiltinRenderTextureType.CurrentActive);
light.AddCommandBuffer(LightEvent.AfterScreenspaceMask, lightBuffer);
}
and the question is how does these code work ,is there anybody can explain for me?