1
0
mirror of https://github.com/maxartz15/VolumetricLighting.git synced 2025-07-17 21:46:12 +02:00

Improved transmission with an integral over slice depth - behaves nic…

This commit is contained in:
Robert Cupisz
2017-04-06 13:53:09 +02:00
parent 6853822b7e
commit 9589c93f77
2 changed files with 23 additions and 19 deletions
Assets/VolumetricFog

@@ -455,7 +455,7 @@ public class VolumetricFog : MonoBehaviour
// Compensate for more light and density being injected in per world space meter when near and far are closer.
// TODO: Not quite correct yet.
float depthCompensation = (farClip - nearClip) * 0.01f;
m_InjectLightingAndDensity.SetFloat("_Density", m_GlobalDensityMult * 0.001f * depthCompensation);
m_InjectLightingAndDensity.SetFloat("_Density", m_GlobalDensityMult * 0.128f * depthCompensation);
m_InjectLightingAndDensity.SetFloat("_Intensity", m_GlobalIntensityMult);
m_InjectLightingAndDensity.SetFloat("_Anisotropy", m_Anisotropy);
m_InjectLightingAndDensity.SetTexture(kernel, "_VolumeInject", m_VolumeInject);