浏览代码

Addressed code review feedback.

/main
Aleksandr Kirillov 7 年前
当前提交
48b18113
共有 2 个文件被更改,包括 15 次插入18 次删除
  1. 7
      ScriptableRenderPipeline/Core/CoreRP/Utilities/CoreUtils.cs
  2. 26
      ScriptableRenderPipeline/LightweightPipeline/LWRP/LightweightPipeline.cs

7
ScriptableRenderPipeline/Core/CoreRP/Utilities/CoreUtils.cs


ClearRenderTarget(cmd, clearFlag, clearColor);
}
public static void SetRenderTarget(CommandBuffer cmd, RenderTargetIdentifier colorBuffer, RenderBufferLoadAction colorLoadAction, RenderBufferStoreAction colorStoreAction,
RenderTargetIdentifier depthBuffer, RenderBufferLoadAction depthLoadAction, RenderBufferStoreAction depthStoreAction,
ClearFlag clearFlag)
{
SetRenderTarget(cmd, colorBuffer, colorLoadAction, colorStoreAction, depthBuffer, depthLoadAction, depthStoreAction, clearFlag, clearColorAllBlack);
}
public static string GetRenderTargetAutoName(int width, int height, RenderTextureFormat format, string name = "", bool mips = false, bool enableMSAA = false, MSAASamples msaaSamples = MSAASamples.None)
{
string temp;

26
ScriptableRenderPipeline/LightweightPipeline/LWRP/LightweightPipeline.cs


if (m_IsOffscreenCamera)
return;
bool isStereo = CoreUtils.HasFlag(renderingConfig, FrameRenderingConfiguration.Stereo);
bool skipSetRT = false;
{
skipSetRT = true;
}
else if (CoreUtils.HasFlag(renderingConfig, FrameRenderingConfiguration.IntermediateTexture))
else if (CoreUtils.HasFlag(renderingConfig, FrameRenderingConfiguration.IntermediateTexture) &&
!CoreUtils.HasFlag(renderingConfig, FrameRenderingConfiguration.PostProcess))
// If PostProcessing is enabled, it is already blit to CameraTarget.
Material blitMaterial = m_BlitMaterial;
if (CoreUtils.HasFlag(renderingConfig, FrameRenderingConfiguration.Stereo))
blitMaterial = null;
// If PostProcessing is enabled, it is already blit to CameraTarget.
if (!CoreUtils.HasFlag(renderingConfig, FrameRenderingConfiguration.PostProcess))
{
Blit(cmd, renderingConfig, m_CurrCameraColorRT, BuiltinRenderTextureType.CameraTarget, blitMaterial);
skipSetRT = true;
}
Blit(cmd, renderingConfig, m_CurrCameraColorRT, BuiltinRenderTextureType.CameraTarget, isStereo ? null : m_BlitMaterial);
if (!skipSetRT)
else
if (CoreUtils.HasFlag(renderingConfig, FrameRenderingConfiguration.Stereo))
if (isStereo)
{
context.StopMultiEye(m_CurrCamera);
context.StereoEndRender(m_CurrCamera);

正在加载...
取消
保存