public void PushFogShaderParameters(CommandBuffer cmd, FrameSettings frameSettings) { switch (fogType.value) { case FogType.None: { AtmosphericScattering.PushNeutralShaderParameters(cmd); break; } case FogType.Linear: { var fogSettings = VolumeManager.instance.stack.GetComponent <LinearFog>(); fogSettings.PushShaderParameters(cmd, frameSettings); break; } case FogType.Exponential: { var fogSettings = VolumeManager.instance.stack.GetComponent <ExponentialFog>(); fogSettings.PushShaderParameters(cmd, frameSettings); break; } } }
public void PushFogShaderParameters(HDCamera hdCamera, CommandBuffer cmd) { if (!hdCamera.frameSettings.enableAtmosphericScattering) { AtmosphericScattering.PushNeutralShaderParameters(hdCamera, cmd); return; } switch (fogType.value) { case FogType.None: { AtmosphericScattering.PushNeutralShaderParameters(hdCamera, cmd); break; } case FogType.Linear: { var fogSettings = VolumeManager.instance.stack.GetComponent <LinearFog>(); fogSettings.PushShaderParameters(hdCamera, cmd); break; } case FogType.Exponential: { var fogSettings = VolumeManager.instance.stack.GetComponent <ExponentialFog>(); fogSettings.PushShaderParameters(hdCamera, cmd); break; } case FogType.Volumetric: { var fogSettings = VolumeManager.instance.stack.GetComponent <VolumetricFog>(); fogSettings.PushShaderParameters(hdCamera, cmd); break; } } }