|
|
|
|
|
|
m_FilterSubsurfaceScattering.SetVectorArray("_FilterKernels", sssParameters.filterKernels); |
|
|
|
m_FilterSubsurfaceScattering.SetVectorArray("_HalfRcpWeightedVariances", sssParameters.halfRcpWeightedVariances); |
|
|
|
cmd.SetGlobalTexture("_IrradianceSource", m_CameraSubsurfaceBufferRT); |
|
|
|
Utilities.DrawFullScreen(cmd, m_FilterSubsurfaceScattering, hdCamera, |
|
|
|
m_CameraFilteringBufferRT, m_CameraDepthStencilBufferRT); |
|
|
|
Utilities.DrawFullScreen(cmd, m_FilterSubsurfaceScattering, hdCamera, m_CameraFilteringBufferRT, m_CameraDepthStencilBufferRT); |
|
|
|
|
|
|
|
// when recombining the lighting, we apply albedo. This need to be modified in case of debug display with diffuse lighting only.
|
|
|
|
Utilities.SetKeyword(m_FilterAndCombineSubsurfaceScattering, "DEBUG_DISPLAY", debugDisplaySettings.IsDebugDisplayEnabled()); |
|
|
|
Utilities.DrawFullScreen(cmd, m_FilterAndCombineSubsurfaceScattering, hdCamera, |
|
|
|
m_CameraColorBufferRT, m_CameraDepthStencilBufferRT); |
|
|
|
Utilities.DrawFullScreen(cmd, m_FilterAndCombineSubsurfaceScattering, hdCamera, m_CameraColorBufferRT, m_CameraDepthStencilBufferRT); |
|
|
|
|
|
|
|
context.ExecuteCommandBuffer(cmd); |
|
|
|
cmd.Dispose(); |
|
|
|