浏览代码

work around trunk temp rt issue,

/Branch_batcher
Tim Cooper 8 年前
当前提交
ca33f791
共有 2 个文件被更改,包括 9 次插入1 次删除
  1. 9
      Assets/GraphicsTests/Editor/TestFramework.cs
  2. 1
      Assets/GraphicsTests/SetupSceneForRenderPipelineTest.cs

9
Assets/GraphicsTests/Editor/TestFramework.cs


Assert.IsNotNull(testSetup, "No SetupSceneForRenderPipelineTest in scene " + testInfo.name);
Assert.IsNotNull(testSetup.cameraToUse, "No configured camera in <SetupSceneForRenderPipelineTest>");
var rtDesc = new RenderTextureDescriptor (
testSetup.width,
testSetup.height,
testSetup.hdr ? RenderTextureFormat.ARGBHalf : RenderTextureFormat.ARGB32,
24);
rtDesc.sRGB = PlayerSettings.colorSpace == ColorSpace.Linear;
var tempTarget = RenderTexture.GetTemporary (testSetup.width, testSetup.height, 24);
var tempTarget = RenderTexture.GetTemporary (rtDesc);
var oldTarget = testSetup.cameraToUse.targetTexture;
testSetup.cameraToUse.targetTexture = tempTarget;
testSetup.cameraToUse.Render ();

1
Assets/GraphicsTests/SetupSceneForRenderPipelineTest.cs


private RenderPipelineAsset m_OriginalAsset;
public RenderPipelineAsset renderPipeline;
public Camera cameraToUse;
public bool hdr = false;
public int width = 1280;
public int height = 720;

正在加载...
取消
保存