|
|
|
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
// The first thing to do is to go through all lights on the CPU side and prepare light for GPU.
|
|
|
|
// This allow us to deal with the flexibility of shadow mask that will do a GBuffer allocation on demand (in case of deferred rendering)
|
|
|
|
m_LightLoop.PrepareLightsForGPU(m_ShadowSettings, m_CullResults, camera); |
|
|
|
|
|
|
|
InitAndClearBuffer(hdCamera, cmd); |
|
|
|
|
|
|
|
RenderDepthPrepass(m_CullResults, camera, renderContext, cmd); |
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
m_LightLoop.PrepareLightsForGPU(m_ShadowSettings, m_CullResults, camera); |
|
|
|
m_LightLoop.RenderShadows(renderContext, cmd, m_CullResults); |
|
|
|
|
|
|
|
cmd.GetTemporaryRT(m_DeferredShadowBuffer, camera.pixelWidth, camera.pixelHeight, 0, FilterMode.Point, RenderTextureFormat.ARGB32, RenderTextureReadWrite.Linear, 1 , true); |
|
|
|
|
|
|
bool preRefractionQueue = false) |
|
|
|
{ |
|
|
|
m_SinglePassName[0] = passName; |
|
|
|
RenderTransparentRenderList(cull, camera, renderContext, cmd, m_SinglePassName, |
|
|
|
RenderTransparentRenderList(cull, camera, renderContext, cmd, m_SinglePassName, |
|
|
|
rendererConfiguration, stateBlock, overrideMaterial, preRefractionQueue); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var filterSettings = new FilterRenderersSettings(true) |
|
|
|
{ |
|
|
|
renderQueueRange = preRefractionQueue |
|
|
|
? k_RenderQueue_PreRefraction |
|
|
|
renderQueueRange = preRefractionQueue |
|
|
|
? k_RenderQueue_PreRefraction |
|
|
|
: k_RenderQueue_Transparent |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
RenderTransparentRenderList(cullResults, camera, renderContext, cmd, m_ForwardErrorPassNames, 0, |
|
|
|
RenderTransparentRenderList(cullResults, camera, renderContext, cmd, m_ForwardErrorPassNames, 0, |
|
|
|
null, m_ErrorMaterial, pass == ForwardPass.PreRefraction); |
|
|
|
} |
|
|
|
} |
|
|
|