浏览代码

Updated reflection system settings

/main
Frédéric Vauchelles 7 年前
当前提交
fca384e1
共有 4 个文件被更改,包括 21 次插入7 次删除
  1. 2
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/HDRenderPipelineAsset.cs
  2. 6
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/Reflection/ReflectionProbeCullResults.cs
  3. 2
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/Reflection/ReflectionSystemInternal.cs
  4. 18
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/Reflection/ReflectionSystemParameters.cs

2
ScriptableRenderPipeline/HDRenderPipeline/HDRP/HDRenderPipelineAsset.cs


{
return new ReflectionSystemParameters
{
maxPlanarReflectionProbePerRender = renderPipelineSettings.lightLoopSettings.planarReflectionProbeCacheSize,
maxPlanarReflectionProbePerCamera = renderPipelineSettings.lightLoopSettings.planarReflectionProbeCacheSize,
maxActivePlanarReflectionProbe = 512,
planarReflectionProbeSize = renderPipelineSettings.lightLoopSettings.planarReflectionTextureSize
};

6
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/Reflection/ReflectionProbeCullResults.cs


internal ReflectionProbeCullResults(ReflectionSystemParameters parameters)
{
Assert.IsTrue(parameters.maxPlanarReflectionProbePerRender >= 0, "Maximum number of planar reflection probe must be positive");
Assert.IsTrue(parameters.maxPlanarReflectionProbePerCamera >= 0, "Maximum number of planar reflection probe must be positive");
m_PlanarReflectionProbeIndices = new int[parameters.maxPlanarReflectionProbePerRender];
m_VisiblePlanarReflectionProbes = new PlanarReflectionProbe[parameters.maxPlanarReflectionProbePerRender];
m_PlanarReflectionProbeIndices = new int[parameters.maxPlanarReflectionProbePerCamera];
m_VisiblePlanarReflectionProbes = new PlanarReflectionProbe[parameters.maxPlanarReflectionProbePerCamera];
}
public void CullPlanarReflectionProbes(CullingGroup cullingGroup, PlanarReflectionProbe[] planarReflectionProbes)

2
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/Reflection/ReflectionSystemInternal.cs


m_PlanarReflectionProbeBounds = new Dictionary<PlanarReflectionProbe, BoundingSphere>(parameters.maxActivePlanarReflectionProbe);
m_PlanarReflectionProbesArray = new PlanarReflectionProbe[parameters.maxActivePlanarReflectionProbe];
m_PlanarReflectionProbeBoundsArray = new BoundingSphere[parameters.maxActivePlanarReflectionProbe];
m_PlanarReflectionProbe_RealtimeUpdate_WorkArray = new PlanarReflectionProbe[parameters.maxPlanarReflectionProbePerRender];
m_PlanarReflectionProbe_RealtimeUpdate_WorkArray = new PlanarReflectionProbe[parameters.maxPlanarReflectionProbePerCamera];
// Persistent collections
m_PlanarReflectionProbes = new HashSet<PlanarReflectionProbe>();

18
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/Reflection/ReflectionSystemParameters.cs


namespace UnityEngine.Experimental.Rendering.HDPipeline
{
/// <summary>
/// Holds settings for the reflection system.
/// </summary>
maxPlanarReflectionProbePerRender = 512,
maxPlanarReflectionProbePerCamera = 128,
public int maxPlanarReflectionProbePerRender;
/// <summary>
/// Maximum number of planar reflection that can be found in a cull result.
/// </summary>
public int maxPlanarReflectionProbePerCamera;
/// <summary>
/// Maximum number of active planar reflection in the world.
/// </summary>
/// <summary>
/// Size of the planar probe textures.
/// </summary>
public int planarReflectionProbeSize;
}
}
正在加载...
取消
保存