浏览代码

HDRP: Change settigs name from supportForwardOnly to supportOnlyForward

/main
sebastienlagarde 7 年前
当前提交
bba0731d
共有 7 个文件被更改,包括 12 次插入10 次删除
  1. 6
      com.unity.render-pipelines.high-definition/HDRP/Editor/BuildPlayer/HDRPVariantStripper.cs
  2. 2
      com.unity.render-pipelines.high-definition/HDRP/Editor/RenderLoopSettings/RenderPipelineSettingsUI.cs
  3. 4
      com.unity.render-pipelines.high-definition/HDRP/Editor/RenderLoopSettings/SerializedRenderPipelineSettings.cs
  4. 2
      com.unity.render-pipelines.high-definition/HDRP/HDRenderPipeline.cs
  5. 2
      com.unity.render-pipelines.high-definition/HDRP/Material/SubsurfaceScattering/SubsurfaceScatteringManager.cs
  6. 2
      com.unity.render-pipelines.high-definition/HDRP/RenderPipeline/FrameSettings.cs
  7. 4
      com.unity.render-pipelines.high-definition/HDRP/RenderPipeline/RenderPipelineSettings.cs

6
com.unity.render-pipelines.high-definition/HDRP/Editor/BuildPlayer/HDRPVariantStripper.cs


return true;
// When using forward only, we never need GBuffer pass (only Forward)
if (m_CurrentHDRPAsset.renderPipelineSettings.supportForwardOnly && isGBufferPass)
if (m_CurrentHDRPAsset.renderPipelineSettings.supportOnlyForward && isGBufferPass)
return true;
if (inputData.shaderKeywordSet.IsEnabled(m_Transparent))

if (isTransparentForwardPass)
return true;
if (!m_CurrentHDRPAsset.renderPipelineSettings.supportForwardOnly && inputData.shaderKeywordSet.IsEnabled(m_ClusterLighting))
if (!m_CurrentHDRPAsset.renderPipelineSettings.supportOnlyForward && inputData.shaderKeywordSet.IsEnabled(m_ClusterLighting))
if (!m_CurrentHDRPAsset.renderPipelineSettings.supportForwardOnly)
if (!m_CurrentHDRPAsset.renderPipelineSettings.supportOnlyForward)
{
// If opaque and not forward only, then we only need the forward debug pass.
if (isForwardPass && !inputData.shaderKeywordSet.IsEnabled(m_DebugDisplay))

2
com.unity.render-pipelines.high-definition/HDRP/Editor/RenderLoopSettings/RenderPipelineSettingsUI.cs


EditorGUILayout.PropertyField(d.supportMSAA, _.GetContent("Support Multi Sampling Anti-Aliasing"));
EditorGUILayout.PropertyField(d.MSAASampleCount, _.GetContent("MSAA Sample Count"));
EditorGUILayout.PropertyField(d.supportSubsurfaceScattering, _.GetContent("Support Subsurface Scattering"));
EditorGUILayout.PropertyField(d.supportForwardOnly, _.GetContent("Support Forward Only"));
EditorGUILayout.PropertyField(d.supportOnlyForward, _.GetContent("Support Only Forward"));
EditorGUILayout.PropertyField(d.supportMotionVectors, _.GetContent("Support Motion Vectors"));
EditorGUILayout.PropertyField(d.supportStereo, _.GetContent("Support Stereo Rendering"));
EditorGUILayout.PropertyField(d.enableUltraQualitySSS, _.GetContent("Increase SSS Sample Count"));

4
com.unity.render-pipelines.high-definition/HDRP/Editor/RenderLoopSettings/SerializedRenderPipelineSettings.cs


public SerializedProperty supportMSAA;
public SerializedProperty MSAASampleCount;
public SerializedProperty supportSubsurfaceScattering;
public SerializedProperty supportForwardOnly;
public SerializedProperty supportOnlyForward;
public SerializedProperty supportMotionVectors;
public SerializedProperty supportStereo;
public SerializedProperty enableUltraQualitySSS;

supportMSAA = root.Find((RenderPipelineSettings s) => s.supportMSAA);
MSAASampleCount = root.Find((RenderPipelineSettings s) => s.msaaSampleCount);
supportSubsurfaceScattering = root.Find((RenderPipelineSettings s) => s.supportSubsurfaceScattering);
supportForwardOnly = root.Find((RenderPipelineSettings s) => s.supportForwardOnly);
supportOnlyForward = root.Find((RenderPipelineSettings s) => s.supportOnlyForward);
supportMotionVectors = root.Find((RenderPipelineSettings s) => s.supportMotionVectors);
supportStereo = root.Find((RenderPipelineSettings s) => s.supportStereo);
enableUltraQualitySSS = root.Find((RenderPipelineSettings s) => s.enableUltraQualitySSS);

2
com.unity.render-pipelines.high-definition/HDRP/HDRenderPipeline.cs


void InitializeRenderTextures()
{
if (!m_Asset.renderPipelineSettings.supportForwardOnly)
if (!m_Asset.renderPipelineSettings.supportOnlyForward)
m_GbufferManager.CreateBuffers();
if (m_Asset.renderPipelineSettings.supportDBuffer)

2
com.unity.render-pipelines.high-definition/HDRP/Material/SubsurfaceScattering/SubsurfaceScatteringManager.cs


public void InitSSSBuffers(GBufferManager gbufferManager, RenderPipelineSettings settings)
{
// TODO: For MSAA, at least initially, we can only support Jimenez, because we can't create MSAA + UAV render targets.
if (settings.supportForwardOnly)
if (settings.supportOnlyForward)
{
// In case of full forward we must allocate the render target for forward SSS (or reuse one already existing)
// TODO: Provide a way to reuse a render target

2
com.unity.render-pipelines.high-definition/HDRP/RenderPipeline/FrameSettings.cs


// We have to fall back to forward-only rendering when scene view is using wireframe rendering mode
// as rendering everything in wireframe + deferred do not play well together
aggregate.enableForwardRenderingOnly = srcFrameSettings.enableForwardRenderingOnly || GL.wireframe || renderPipelineSettings.supportForwardOnly;
aggregate.enableForwardRenderingOnly = srcFrameSettings.enableForwardRenderingOnly || GL.wireframe || renderPipelineSettings.supportOnlyForward;
aggregate.enableDepthPrepassWithDeferredRendering = srcFrameSettings.enableDepthPrepassWithDeferredRendering;
aggregate.enableTransparentPrepass = srcFrameSettings.enableTransparentPrepass;

4
com.unity.render-pipelines.high-definition/HDRP/RenderPipeline/RenderPipelineSettings.cs


using System;
using UnityEngine;
using UnityEngine.Serialization;
namespace UnityEngine.Experimental.Rendering.HDPipeline
{

public bool supportSSR = true;
public bool supportSSAO = true;
public bool supportSubsurfaceScattering = true;
public bool supportForwardOnly = false;
[FormerlySerializedAs("supportForwardOnly")]
public bool supportOnlyForward = false;
public bool enableUltraQualitySSS = false;
public bool supportVolumetric = true;

正在加载...
取消
保存