浏览代码

Update after feedback, minor refactor

/main
sebastienlagarde 7 年前
当前提交
1a895aa3
共有 1 个文件被更改,包括 8 次插入4 次删除
  1. 12
      ScriptableRenderPipeline/HDRenderPipeline/HDRenderPipeline.cs

12
ScriptableRenderPipeline/HDRenderPipeline/HDRenderPipeline.cs


// Guidelines: To be able to switch from deferred to forward renderer we need to have forward opaque material with both Forward and ForwardOnlyOpaque pass.
// This is what is assume here. But users may want to reduce number of shader combination once they have made their choice.
// If we are transparent, we add the forward pass. Else we add it only if we are forward rendering
bool addForwardPass = (renderOpaque && m_Asset.renderingSettings.ShouldUseForwardRenderingOnly()) || !renderOpaque;
// If we are transparent, we add the forward pass. Else (Render Opaque) we add it only if we are forward rendering
bool addForwardPass = !renderOpaque || m_Asset.renderingSettings.ShouldUseForwardRenderingOnly();
bool addForwardOnlyOpaquePass = renderOpaque && !m_Asset.renderingSettings.ShouldUseForwardRenderingOnly();
// It mean that addForwardOnlyOpaquePass = !addForwardPass which is a simplification of: renderOpaque && !m_Asset.renderingSettings.ShouldUseForwardRenderingOnly()
// There is no need to store this case as we don't need to test for it
// Note: Only addForwardPass or addForwardOnlyOpaquePass can be true, not both at the same time and they can't be false at the same time, so we always have a pass here.
ShaderPassName passName;
string profileName;
if (m_DebugDisplaySettings.IsDebugDisplayEnabled())

// TODO: Currently we can't render velocity vector into GBuffer, neither during forward pass (in case of forward opaque), so it is always a separate pass
// Note that we if we have forward only opaque with deferred rendering, it must also support the rendering of velocity vector to be correct with following test.
if ((ShaderConfig.s_VelocityInGbuffer == 1))
{
Debug.LogWarning("Velocity in Gbuffer is currently not supported");
}
// These flags are still required in SRP or the engine won't compute previous model matrices...
// If the flag hasn't been set yet on this camera, motion vectors will skip a frame.

正在加载...
取消
保存