|
|
|
|
|
|
cmd.SetComputeTextureParam(deferredComputeShader, kernel, HDShaderIDs.specularLightingUAV, colorBuffers[0]); |
|
|
|
cmd.SetComputeTextureParam(deferredComputeShader, kernel, HDShaderIDs.diffuseLightingUAV, colorBuffers[1]); |
|
|
|
|
|
|
|
if (debugDisplaySettings.lightingDebugSettings.debugLightingMode == DebugLightingMode.ScreenSpaceTracingReflection) |
|
|
|
if (debugDisplaySettings.IsDebugDisplayEnabled()) |
|
|
|
cmd.SetComputeBufferParam(deferredComputeShader, kernel, HDShaderIDs._DebugScreenSpaceTracingData, debugSSTBuffer); |
|
|
|
|
|
|
|
// always do deferred lighting in blocks of 16x16 (not same as tiled light size)
|
|
|
|
|
|
|
currentLightingMaterial.SetInt(HDShaderIDs._StencilCmp, (int)CompareFunction.Equal); |
|
|
|
} |
|
|
|
|
|
|
|
var debugSSTThisFrame = debugDisplaySettings.lightingDebugSettings.debugLightingMode == DebugLightingMode.ScreenSpaceTracingReflection; |
|
|
|
var debugSSTThisFrame = debugDisplaySettings.IsDebugDisplayEnabled(); |
|
|
|
if (debugSSTThisFrame) |
|
|
|
cmd.SetRandomWriteTarget(7, debugSSTBuffer); |
|
|
|
CoreUtils.DrawFullScreen(cmd, currentLightingMaterial, colorBuffers[0], depthStencilBuffer); |
|
|
|