|
|
|
|
|
|
|
|
|
|
SetupPerObjectLightIndices(ref cullResults, ref renderingData.lightData); |
|
|
|
RenderTextureDescriptor baseDescriptor = CreateRTDesc(ref renderingData.cameraData); |
|
|
|
RenderTextureDescriptor shadowDescriptor = baseDescriptor; |
|
|
|
shadowDescriptor.dimension = TextureDimension.Tex2D; |
|
|
|
|
|
|
|
bool requiresCameraDepth = renderingData.cameraData.requiresDepthTexture; |
|
|
|
bool requiresDepthPrepass = renderingData.shadowData.requiresScreenSpaceShadowResolve || |
|
|
|
|
|
|
|
|
|
|
if (renderingData.shadowData.renderDirectionalShadows) |
|
|
|
{ |
|
|
|
EnqueuePass(cmd, RenderPassHandles.DirectionalShadows, baseDescriptor); |
|
|
|
EnqueuePass(cmd, RenderPassHandles.DirectionalShadows, shadowDescriptor); |
|
|
|
EnqueuePass(cmd, RenderPassHandles.LocalShadows, baseDescriptor); |
|
|
|
EnqueuePass(cmd, RenderPassHandles.LocalShadows, shadowDescriptor); |
|
|
|
|
|
|
|
bool requiresDepthAttachment = requiresCameraDepth && !requiresDepthPrepass; |
|
|
|
bool requiresColorAttachment = RequiresIntermediateColorTexture(ref renderingData.cameraData, baseDescriptor, requiresDepthAttachment); |
|
|
|