浏览代码

Set up Intermediate Blit option on BasicRenderPipeline asset

Do some plumbing in order to set up a UI interface for BasicRenderPipeline, in order for the actual rendering to pick up this option.  It will be used to configure an example intermediate target for rendering.
/RenderPassXR_Sandbox
robbiesri 7 年前
当前提交
e4853716
共有 1 个文件被更改,包括 17 次插入3 次删除
  1. 20
      Assets/ScriptableRenderPipeline/BasicRenderPipeline/BasicRenderPipeline.cs

20
Assets/ScriptableRenderPipeline/BasicRenderPipeline/BasicRenderPipeline.cs


[ExecuteInEditMode]
public class BasicRenderPipeline : RenderPipelineAsset
{
public bool UseIntermediateRenderTargetBlit;
#if UNITY_EDITOR
[UnityEditor.MenuItem("RenderPipeline/Create BasicRenderPipeline")]
static void CreateBasicRenderPipeline()

protected override IRenderPipeline InternalCreatePipeline()
{
return new BasicRenderPipelineInstance();
return new BasicRenderPipelineInstance(UseIntermediateRenderTargetBlit);
bool useIntermediateBlit;
public BasicRenderPipelineInstance()
{
useIntermediateBlit = false;
}
public BasicRenderPipelineInstance(bool useIntermediate)
{
useIntermediateBlit = useIntermediate;
}
BasicRendering.Render(renderContext, cameras);
BasicRendering.Render(renderContext, cameras, useIntermediateBlit);
}
}

public static void Render(ScriptableRenderContext context, IEnumerable<Camera> cameras)
public static void Render(ScriptableRenderContext context, IEnumerable<Camera> cameras, bool useIntermediateBlit)
{
bool stereoEnabled = XRSettings.isDeviceActive;

正在加载...
取消
保存