浏览代码

Rename "HomogeneousMediumVolume" to "HomogeneousDensityVolume"

/main
Evgenii Golubev 7 年前
当前提交
0c573a4a
共有 2 个文件被更改,包括 9 次插入9 次删除
  1. 10
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/Volumetrics/HomogeneousMediumVolume.cs
  2. 8
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/Volumetrics/VolumetricLighting.cs

10
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/Volumetrics/HomogeneousMediumVolume.cs


{
[ExecuteInEditMode]
[AddComponentMenu("RenderPipeline/High Definition/Homogeneous Medium Volume", -1)]
public class HomogeneousMediumVolume : MonoBehaviour
public class HomogeneousDensityVolume : MonoBehaviour
{
public VolumeParameters volumeParameters = new VolumeParameters();

}
// Returns NULL if a global fog component does not exist, or is not enabled.
public static HomogeneousMediumVolume GetGlobalHomogeneousMediumVolume()
public static HomogeneousDensityVolume GetGlobalHomogeneousDensityVolume()
HomogeneousMediumVolume globalVolume = null;
HomogeneousDensityVolume globalVolume = null;
HomogeneousMediumVolume[] volumes = FindObjectsOfType(typeof(HomogeneousMediumVolume)) as HomogeneousMediumVolume[];
HomogeneousDensityVolume[] volumes = FindObjectsOfType(typeof(HomogeneousDensityVolume)) as HomogeneousDensityVolume[];
foreach (HomogeneousMediumVolume volume in volumes)
foreach (HomogeneousDensityVolume volume in volumes)
{
if (volume.enabled && !volume.volumeParameters.IsLocalVolume())
{

8
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Lighting/Volumetrics/VolumetricLighting.cs


{
if (preset == VolumetricLightingPreset.Off) return;
HomogeneousMediumVolume globalVolume = HomogeneousMediumVolume.GetGlobalHomogeneousMediumVolume();
HomogeneousDensityVolume globalVolume = HomogeneousDensityVolume.GetGlobalHomogeneousDensityVolume();
// TODO: may want to cache these results somewhere.
VolumeProperties globalVolumeProperties = (globalVolume != null) ? globalVolume.volumeParameters.GetProperties()

m_VisibleVolumeProperties.Clear();
// Collect all the visible volume data, and upload it to the GPU.
HomogeneousMediumVolume[] volumes = Object.FindObjectsOfType(typeof(HomogeneousMediumVolume)) as HomogeneousMediumVolume[];
HomogeneousDensityVolume[] volumes = Object.FindObjectsOfType(typeof(HomogeneousDensityVolume)) as HomogeneousDensityVolume[];
foreach (HomogeneousMediumVolume volume in volumes)
foreach (HomogeneousDensityVolume volume in volumes)
{
// Only test active finite volumes.
if (volume.enabled && volume.volumeParameters.IsLocalVolume())

VBuffer vBuffer = FindVBuffer(camera.GetViewID());
Debug.Assert(vBuffer != null);
HomogeneousMediumVolume globalVolume = HomogeneousMediumVolume.GetGlobalHomogeneousMediumVolume();
HomogeneousDensityVolume globalVolume = HomogeneousDensityVolume.GetGlobalHomogeneousDensityVolume();
float asymmetry = globalVolume != null ? globalVolume.volumeParameters.asymmetry : 0;
if (globalVolume == null)

正在加载...
取消
保存