浏览代码

Fixed camera background color.

/RenderPassXR_Sandbox
Felipe Lira 7 年前
当前提交
8ef5b589
共有 1 个文件被更改,包括 7 次插入6 次删除
  1. 13
      ScriptableRenderPipeline/LightweightPipeline/LightweightPipeline.cs

13
ScriptableRenderPipeline/LightweightPipeline/LightweightPipeline.cs


QualitySettings.antiAliasing = m_Asset.MSAASampleCount;
Shader.globalRenderPipeline = "LightweightPipeline";
// TODO: This is at the moment required for all pipes. We should not implicitly change user project settings
// instead this should be forced when using SRP, since all SRP use linear lighting.
GraphicsSettings.lightsUseLinearIntensity = true;
}
public override void Dispose()

base.Render(context, cameras);
bool stereoEnabled = XRSettings.isDeviceActive;
// TODO: This is at the moment required for all pipes. We should not implicitly change user project settings
// instead this should be forced when using SRP, since all SRP use linear lighting.
GraphicsSettings.lightsUseLinearIntensity = true;
Debug.Log(GraphicsSettings.lightsUseLinearIntensity);
foreach (Camera camera in cameras)
{

if (m_CurrCamera.clearFlags != CameraClearFlags.Nothing)
{
bool clearDepth = (m_CurrCamera.clearFlags != CameraClearFlags.Nothing);
bool clearColor = (m_CurrCamera.clearFlags == CameraClearFlags.Color);
cmd.ClearRenderTarget(clearDepth, clearColor, m_CurrCamera.backgroundColor);
bool clearColor = (m_CurrCamera.clearFlags == CameraClearFlags.Color || m_CurrCamera.clearFlags == CameraClearFlags.Skybox);
cmd.ClearRenderTarget(clearDepth, clearColor, m_CurrCamera.backgroundColor.linear);
}
context.ExecuteCommandBuffer(cmd);

正在加载...
取消
保存