|
|
|
|
|
|
int height = cameraTargetDescriptor.height; |
|
|
|
colorAttachmentDescriptor.ConfigureTarget(renderer.m_CameraColorAttachment.Identifier(), false, true); |
|
|
|
colorAttachmentDescriptor.ConfigureClear(renderingData.cameraData.camera.backgroundColor); |
|
|
|
depthAttachmentDescriptor.ConfigureClear(Color.black); |
|
|
|
using (context.BeginScopedRenderPass(width, height, 1, descriptors, 1)) |
|
|
|
int depthAttachmentIndex = 1; |
|
|
|
using (context.BeginScopedRenderPass(width, height, 1, descriptors, depthAttachmentIndex)) |
|
|
|
{ |
|
|
|
descriptors.Dispose(); |
|
|
|
NativeArray<int> attachmentIndices = new NativeArray<int>(new[] { 0 }, Allocator.Temp); |
|
|
|
|
|
|
context.DrawSkybox(renderingData.cameraData.camera); |
|
|
|
} |
|
|
|
|
|
|
|
// Caustics Subpass
|
|
|
|
// Caustics Subpass - Reads Depth as Input
|
|
|
|
using (context.BeginScopedSubPass(attachmentIndices, inputIndices, false)) |
|
|
|
using (context.BeginScopedSubPass(attachmentIndices, inputIndices, true)) |
|
|
|
{ |
|
|
|
attachmentIndices.Dispose(); |
|
|
|
inputIndices.Dispose(); |
|
|
|