|
|
|
|
|
|
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); |
|
|
|