|
|
|
|
|
|
using System; |
|
|
|
using UnityEngine; |
|
|
|
|
|
|
|
namespace UnityEngine.Experimental.Rendering.HDPipeline |
|
|
|
{ |
|
|
|
[Serializable] |
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
// aggregateFrameSettings already contain the aggregation of RenderPipelineSettings and FrameSettings (regular and/or debug)
|
|
|
|
static public LightLoopSettings InitializeLightLoopSettings(Camera camera, FrameSettings aggregateFrameSettings, |
|
|
|
RenderPipelineSettings renderPipelineSettings, FrameSettings frameSettings) |
|
|
|
public static void InitializeLightLoopSettings(Camera camera, FrameSettings aggregateFrameSettings, |
|
|
|
RenderPipelineSettings renderPipelineSettings, FrameSettings frameSettings, |
|
|
|
ref LightLoopSettings dstLightLoopSettings) |
|
|
|
LightLoopSettings aggregate = new LightLoopSettings(); |
|
|
|
if (dstLightLoopSettings == null) |
|
|
|
dstLightLoopSettings = new LightLoopSettings(); |
|
|
|
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.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.enableFptlForForwardOpaque = aggregate.enableFptlForForwardOpaque && aggregateFrameSettings.enableMSAA; |
|
|
|
dstLightLoopSettings.enableFptlForForwardOpaque = dstLightLoopSettings.enableFptlForForwardOpaque && aggregateFrameSettings.enableMSAA; |
|
|
|
aggregate.isFptlEnabled = !aggregateFrameSettings.enableForwardRenderingOnly || aggregate.enableFptlForForwardOpaque; |
|
|
|
|
|
|
|
return aggregate; |
|
|
|
dstLightLoopSettings.isFptlEnabled = !aggregateFrameSettings.enableForwardRenderingOnly || dstLightLoopSettings.enableFptlForForwardOpaque; |
|
|
|
} |
|
|
|
|
|
|
|
static public void RegisterDebug(String menuName, LightLoopSettings lightLoopSettings) |
|
|
|