public override void Execute(ScriptableRenderContext context, ref RenderingData renderingData) { var cmd = CommandBufferPool.Get(CommandBufferTag); try{ _ssprTexGenerator.Render(cmd, ref renderingData); cmd.SetRenderTarget(this.colorAttachment, this.depthAttachment); foreach (var planar in ReflectPlanar.activePlanars) { var rd = planar.GetComponent <Renderer>(); cmd.DrawRenderer(rd, _material); } _ssprTexGenerator.ReleaseTemporary(cmd); context.ExecuteCommandBuffer(cmd); }finally{ CommandBufferPool.Release(cmd); } }
public override void Execute(ScriptableRenderContext context, ref RenderingData renderingData) { var cmd = CommandBufferPool.Get(CommandBufferTag); try{ ReflectPlanar.GetVisiblePlanarGroups(_planarRendererGroups); foreach (var group in _planarRendererGroups.rendererGroups) { cmd.Clear(); var planarDescriptor = group.descriptor; var renderers = group.renderers; _ssprTexGenerator.Render(cmd, ref renderingData, ref planarDescriptor); cmd.SetRenderTarget(this.colorAttachment, this.depthAttachment); foreach (var rd in renderers) { cmd.DrawRenderer(rd, _material); } _ssprTexGenerator.ReleaseTemporary(cmd); context.ExecuteCommandBuffer(cmd); } }finally{ CommandBufferPool.Release(cmd); } }