浏览代码

[SRP]Fix changed API

/main
Tim Cooper 8 年前
当前提交
d6293d68
共有 3 个文件被更改,包括 6 次插入6 次删除
  1. 4
      Assets/Editor/Tests/RenderloopTests/RenderloopTestFixture.cs
  2. 6
      Assets/ScriptableRenderLoop/HDRenderPipeline/HDRenderPipeline.cs
  3. 2
      Assets/ScriptableRenderLoop/HDRenderPipeline/Utilities.cs

4
Assets/Editor/Tests/RenderloopTests/RenderloopTestFixture.cs


var sceneCamera = Camera.main;
var camObject = sceneCamera.gameObject;
GraphicsSettings.renderPipeline = m_Instance;
GraphicsSettings.renderPipelineAsset = m_Instance;
s_Callback = renderCallback;
Transform t = camObject.transform;

SceneView.lastActiveSceneView.LookAtDirect(t.position + t.forward * camDist, t.rotation, size);
sceneCamera.Render();
GraphicsSettings.renderPipeline = null;
GraphicsSettings.renderPipelineAsset = null;
}
}

6
Assets/ScriptableRenderLoop/HDRenderPipeline/HDRenderPipeline.cs


#endif
previousLightsUseLinearIntensity = UnityEngine.Rendering.GraphicsSettings.lightsUseLinearIntensity;
previousLightsUseCCT = UnityEngine.Rendering.GraphicsSettings.lightsUseCCT;
previousLightsUseCCT = UnityEngine.Rendering.GraphicsSettings.lightsUseColorTemperature;
UnityEngine.Rendering.GraphicsSettings.lightsUseCCT = true;
UnityEngine.Rendering.GraphicsSettings.lightsUseColorTemperature = true;
m_CameraColorBuffer = Shader.PropertyToID("_CameraColorTexture");
m_CameraDepthBuffer = Shader.PropertyToID("_CameraDepthTexture");

UnityEditor.SupportedRenderingFeatures.active = UnityEditor.SupportedRenderingFeatures.Default;
#endif
UnityEngine.Rendering.GraphicsSettings.lightsUseLinearIntensity = previousLightsUseLinearIntensity;
UnityEngine.Rendering.GraphicsSettings.lightsUseCCT = previousLightsUseCCT;
UnityEngine.Rendering.GraphicsSettings.lightsUseColorTemperature = previousLightsUseCCT;
}
void InitAndClearBuffer(Camera camera, ScriptableRenderContext renderContext)

2
Assets/ScriptableRenderLoop/HDRenderPipeline/Utilities.cs


public static HDRenderPipeline GetHDRenderPipeline()
{
HDRenderPipeline renderContext = UnityEngine.Rendering.GraphicsSettings.renderPipeline as HDRenderPipeline;
HDRenderPipeline renderContext = GraphicsSettings.renderPipelineAsset as HDRenderPipeline;
if (renderContext == null)
{
Debug.LogWarning("SkyParameters component can only be used with HDRenderPipeline custom RenderPipeline.");

正在加载...
取消
保存