浏览代码

- Fixed useless code causing exception in LightLoop UI

- Fixed a bug where Interpolation Volumes would not be updated for reflection capture.
/main
Julien Ignace 6 年前
当前提交
0e6fbcd6
共有 1 个文件被更改,包括 31 次插入31 次删除
  1. 62
      com.unity.render-pipelines.high-definition/HDRP/RenderPipeline/HDRenderPipeline.cs

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


else
{
m_CurrentDebugDisplaySettings = m_DebugDisplaySettings;
}
using (new ProfilingSample(cmd, "Volume Update", CustomSamplerId.VolumeUpdate.GetSampler()))
using (new ProfilingSample(cmd, "Volume Update", CustomSamplerId.VolumeUpdate.GetSampler()))
{
LayerMask layerMask = -1;
if (additionalCameraData != null)
LayerMask layerMask = -1;
if (additionalCameraData != null)
layerMask = additionalCameraData.volumeLayerMask;
}
else
{
// Temporary hack:
// For scene view, by default, we use the "main" camera volume layer mask if it exists
// Otherwise we just remove the lighting override layers in the current sky to avoid conflicts
// This is arbitrary and should be editable in the scene view somehow.
if (camera.cameraType == CameraType.SceneView)
layerMask = additionalCameraData.volumeLayerMask;
}
else
{
// Temporary hack:
// For scene view, by default, we use the "main" camera volume layer mask if it exists
// Otherwise we just remove the lighting override layers in the current sky to avoid conflicts
// This is arbitrary and should be editable in the scene view somehow.
if (camera.cameraType == CameraType.SceneView)
var mainCamera = Camera.main;
bool needFallback = true;
if (mainCamera != null)
var mainCamera = Camera.main;
bool needFallback = true;
if (mainCamera != null)
var mainCamAdditionalData = mainCamera.GetComponent<HDAdditionalCameraData>();
if (mainCamAdditionalData != null)
var mainCamAdditionalData = mainCamera.GetComponent<HDAdditionalCameraData>();
if (mainCamAdditionalData != null)
{
layerMask = mainCamAdditionalData.volumeLayerMask;
needFallback = false;
}
layerMask = mainCamAdditionalData.volumeLayerMask;
needFallback = false;
}
if (needFallback)
{
// If the override layer is "Everything", we fall-back to "Everything" for the current layer mask to avoid issues by having no current layer
// In practice we should never have "Everything" as an override mask as it does not make sense (a warning is issued in the UI)
if (m_Asset.renderPipelineSettings.lightLoopSettings.skyLightingOverrideLayerMask == -1)
layerMask = -1;
else
layerMask = (-1 & ~m_Asset.renderPipelineSettings.lightLoopSettings.skyLightingOverrideLayerMask);
}
if (needFallback)
{
// If the override layer is "Everything", we fall-back to "Everything" for the current layer mask to avoid issues by having no current layer
// In practice we should never have "Everything" as an override mask as it does not make sense (a warning is issued in the UI)
if (m_Asset.renderPipelineSettings.lightLoopSettings.skyLightingOverrideLayerMask == -1)
layerMask = -1;
else
layerMask = (-1 & ~m_Asset.renderPipelineSettings.lightLoopSettings.skyLightingOverrideLayerMask);
VolumeManager.instance.Update(camera.transform, layerMask);
VolumeManager.instance.Update(camera.transform, layerMask);
}
var postProcessLayer = camera.GetComponent<PostProcessLayer>();

正在加载...
取消
保存