浏览代码

Revert renaming

/main
Thomas 7 年前
当前提交
090f131e
共有 2 个文件被更改,包括 43 次插入43 次删除
  1. 22
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/LightLoop/LightLoopSettings.cs
  2. 64
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/RenderPipeline/FrameSettings.cs

22
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/LightLoop/LightLoopSettings.cs


// aggregateFrameSettings already contain the aggregation of RenderPipelineSettings and FrameSettings (regular and/or debug)
public static void InitializeLightLoopSettings(Camera camera, FrameSettings aggregateFrameSettings,
RenderPipelineSettings renderPipelineSettings, FrameSettings frameSettings,
ref LightLoopSettings dstLightLoopSettings)
ref LightLoopSettings aggregate)
if (dstLightLoopSettings == null)
dstLightLoopSettings = new LightLoopSettings();
if (aggregate == null)
aggregate = new LightLoopSettings();
dstLightLoopSettings.enableTileAndCluster = frameSettings.lightLoopSettings.enableTileAndCluster;
dstLightLoopSettings.enableComputeLightEvaluation = frameSettings.lightLoopSettings.enableComputeLightEvaluation;
dstLightLoopSettings.enableComputeLightVariants = frameSettings.lightLoopSettings.enableComputeLightVariants;
dstLightLoopSettings.enableComputeMaterialVariants = frameSettings.lightLoopSettings.enableComputeMaterialVariants;
dstLightLoopSettings.enableFptlForForwardOpaque = frameSettings.lightLoopSettings.enableFptlForForwardOpaque;
dstLightLoopSettings.enableBigTilePrepass = frameSettings.lightLoopSettings.enableBigTilePrepass;
aggregate.enableTileAndCluster = frameSettings.lightLoopSettings.enableTileAndCluster;
aggregate.enableComputeLightEvaluation = frameSettings.lightLoopSettings.enableComputeLightEvaluation;
aggregate.enableComputeLightVariants = frameSettings.lightLoopSettings.enableComputeLightVariants;
aggregate.enableComputeMaterialVariants = frameSettings.lightLoopSettings.enableComputeMaterialVariants;
aggregate.enableFptlForForwardOpaque = frameSettings.lightLoopSettings.enableFptlForForwardOpaque;
aggregate.enableBigTilePrepass = frameSettings.lightLoopSettings.enableBigTilePrepass;
dstLightLoopSettings.enableFptlForForwardOpaque = dstLightLoopSettings.enableFptlForForwardOpaque && aggregateFrameSettings.enableMSAA;
aggregate.enableFptlForForwardOpaque = aggregate.enableFptlForForwardOpaque && aggregateFrameSettings.enableMSAA;
dstLightLoopSettings.isFptlEnabled = !aggregateFrameSettings.enableForwardRenderingOnly || dstLightLoopSettings.enableFptlForForwardOpaque;
aggregate.isFptlEnabled = !aggregateFrameSettings.enableForwardRenderingOnly || aggregate.enableFptlForForwardOpaque;
}
static public void RegisterDebug(String menuName, LightLoopSettings lightLoopSettings)

64
ScriptableRenderPipeline/HDRenderPipeline/HDRP/RenderPipeline/FrameSettings.cs


// Init a FrameSettings from renderpipeline settings, frame settings and debug settings (if any)
// This will aggregate the various option
public static void InitializeFrameSettings(Camera camera, RenderPipelineSettings renderPipelineSettings, FrameSettings srcFrameSettings, ref FrameSettings dstFrameSettings)
public static void InitializeFrameSettings(Camera camera, RenderPipelineSettings renderPipelineSettings, FrameSettings srcFrameSettings, ref FrameSettings aggregate)
if (dstFrameSettings == null)
dstFrameSettings = new FrameSettings();
if (aggregate == null)
aggregate = new FrameSettings();
dstFrameSettings.diffuseGlobalDimmer = 1.0f;
dstFrameSettings.specularGlobalDimmer = 0.0f;
aggregate.diffuseGlobalDimmer = 1.0f;
aggregate.specularGlobalDimmer = 0.0f;
dstFrameSettings.diffuseGlobalDimmer = 1.0f;
dstFrameSettings.specularGlobalDimmer = 1.0f;
aggregate.diffuseGlobalDimmer = 1.0f;
aggregate.specularGlobalDimmer = 1.0f;
dstFrameSettings.enableShadow = srcFrameSettings.enableShadow;
dstFrameSettings.enableSSR = camera.cameraType != CameraType.Reflection && srcFrameSettings.enableSSR && renderPipelineSettings.supportSSR;
dstFrameSettings.enableSSAO = srcFrameSettings.enableSSAO && renderPipelineSettings.supportSSAO;
dstFrameSettings.enableSubsurfaceScattering = camera.cameraType != CameraType.Reflection && srcFrameSettings.enableSubsurfaceScattering && renderPipelineSettings.supportSubsurfaceScattering;
dstFrameSettings.enableTransmission = srcFrameSettings.enableTransmission;
aggregate.enableShadow = srcFrameSettings.enableShadow;
aggregate.enableSSR = camera.cameraType != CameraType.Reflection && srcFrameSettings.enableSSR && renderPipelineSettings.supportSSR;
aggregate.enableSSAO = srcFrameSettings.enableSSAO && renderPipelineSettings.supportSSAO;
aggregate.enableSubsurfaceScattering = camera.cameraType != CameraType.Reflection && srcFrameSettings.enableSubsurfaceScattering && renderPipelineSettings.supportSubsurfaceScattering;
aggregate.enableTransmission = srcFrameSettings.enableTransmission;
dstFrameSettings.enableForwardRenderingOnly = srcFrameSettings.enableForwardRenderingOnly || GL.wireframe;
dstFrameSettings.enableDepthPrepassWithDeferredRendering = srcFrameSettings.enableDepthPrepassWithDeferredRendering;
dstFrameSettings.enableAlphaTestOnlyInDeferredPrepass = srcFrameSettings.enableAlphaTestOnlyInDeferredPrepass;
aggregate.enableForwardRenderingOnly = srcFrameSettings.enableForwardRenderingOnly || GL.wireframe;
aggregate.enableDepthPrepassWithDeferredRendering = srcFrameSettings.enableDepthPrepassWithDeferredRendering;
aggregate.enableAlphaTestOnlyInDeferredPrepass = srcFrameSettings.enableAlphaTestOnlyInDeferredPrepass;
dstFrameSettings.enableTransparentPrepass = srcFrameSettings.enableTransparentPrepass;
dstFrameSettings.enableMotionVectors = camera.cameraType != CameraType.Reflection && srcFrameSettings.enableMotionVectors;
dstFrameSettings.enableObjectMotionVectors = camera.cameraType != CameraType.Reflection && srcFrameSettings.enableObjectMotionVectors;
dstFrameSettings.enableDBuffer = srcFrameSettings.enableDBuffer && renderPipelineSettings.supportDBuffer;
dstFrameSettings.enableAtmosphericScattering = srcFrameSettings.enableAtmosphericScattering;
dstFrameSettings.enableRoughRefraction = srcFrameSettings.enableRoughRefraction;
dstFrameSettings.enableTransparentPostpass = srcFrameSettings.enableTransparentPostpass;
dstFrameSettings.enableDistortion = camera.cameraType != CameraType.Reflection && srcFrameSettings.enableDistortion;
aggregate.enableTransparentPrepass = srcFrameSettings.enableTransparentPrepass;
aggregate.enableMotionVectors = camera.cameraType != CameraType.Reflection && srcFrameSettings.enableMotionVectors;
aggregate.enableObjectMotionVectors = camera.cameraType != CameraType.Reflection && srcFrameSettings.enableObjectMotionVectors;
aggregate.enableDBuffer = srcFrameSettings.enableDBuffer && renderPipelineSettings.supportDBuffer;
aggregate.enableAtmosphericScattering = srcFrameSettings.enableAtmosphericScattering;
aggregate.enableRoughRefraction = srcFrameSettings.enableRoughRefraction;
aggregate.enableTransparentPostpass = srcFrameSettings.enableTransparentPostpass;
aggregate.enableDistortion = camera.cameraType != CameraType.Reflection && srcFrameSettings.enableDistortion;
dstFrameSettings.enablePostprocess = camera.cameraType != CameraType.Reflection && srcFrameSettings.enablePostprocess;
aggregate.enablePostprocess = camera.cameraType != CameraType.Reflection && srcFrameSettings.enablePostprocess;
dstFrameSettings.enableStereo = camera.cameraType != CameraType.Reflection && srcFrameSettings.enableStereo && XRSettings.isDeviceActive && (camera.stereoTargetEye == StereoTargetEyeMask.Both);
aggregate.enableStereo = camera.cameraType != CameraType.Reflection && srcFrameSettings.enableStereo && XRSettings.isDeviceActive && (camera.stereoTargetEye == StereoTargetEyeMask.Both);
dstFrameSettings.enableForwardRenderingOnly = dstFrameSettings.enableForwardRenderingOnly || dstFrameSettings.enableStereo;
aggregate.enableForwardRenderingOnly = aggregate.enableForwardRenderingOnly || aggregate.enableStereo;
dstFrameSettings.enableAsyncCompute = srcFrameSettings.enableAsyncCompute && renderPipelineSettings.supportAsyncCompute;
aggregate.enableAsyncCompute = srcFrameSettings.enableAsyncCompute && renderPipelineSettings.supportAsyncCompute;
dstFrameSettings.enableOpaqueObjects = srcFrameSettings.enableOpaqueObjects;
dstFrameSettings.enableTransparentObjects = srcFrameSettings.enableTransparentObjects;
aggregate.enableOpaqueObjects = srcFrameSettings.enableOpaqueObjects;
aggregate.enableTransparentObjects = srcFrameSettings.enableTransparentObjects;
dstFrameSettings.enableMSAA = srcFrameSettings.enableMSAA && renderPipelineSettings.supportMSAA;
aggregate.enableMSAA = srcFrameSettings.enableMSAA && renderPipelineSettings.supportMSAA;
dstFrameSettings.enableShadowMask = srcFrameSettings.enableShadowMask && renderPipelineSettings.supportShadowMask;
aggregate.enableShadowMask = srcFrameSettings.enableShadowMask && renderPipelineSettings.supportShadowMask;
LightLoopSettings.InitializeLightLoopSettings(camera, dstFrameSettings, renderPipelineSettings, srcFrameSettings, ref dstFrameSettings.lightLoopSettings);
LightLoopSettings.InitializeLightLoopSettings(camera, aggregate, renderPipelineSettings, srcFrameSettings, ref aggregate.lightLoopSettings);
}
static public void RegisterDebug(String menuName, FrameSettings frameSettings)

正在加载...
取消
保存