浏览代码

minor tweaks.

/demo-work-customrenderer
Felipe Lira 5 年前
当前提交
ec9daab1
共有 1 个文件被更改,包括 5 次插入3 次删除
  1. 8
      Assets/Rendering/MainRenderPass.cs

8
Assets/Rendering/MainRenderPass.cs


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();

正在加载...
取消
保存