mirror of
https://github.com/maxartz15/VolumetricLighting.git
synced 2024-11-27 18:05:35 +01:00
Fix leaking buffer
This commit is contained in:
parent
a0c56e6764
commit
2737a41bc4
@ -493,8 +493,6 @@ public class VolumetricFog : MonoBehaviour
|
||||
m_ambientLight[2] = ambient.b;
|
||||
m_InjectLightingAndDensity.SetFloats("_AmbientLight", m_ambientLight);
|
||||
|
||||
m_DummyCB = new ComputeBuffer(1, 4);
|
||||
|
||||
SetUpPointLightBuffers(kernel);
|
||||
SetUpTubeLightBuffers(kernel);
|
||||
SetUpAreaLightBuffers(kernel);
|
||||
@ -682,6 +680,8 @@ public class VolumetricFog : MonoBehaviour
|
||||
// FogEllipsoidParams {float3 float float3 9xfloat} -> 64 bytes
|
||||
HashSet<FogEllipsoid> fogEllipsoids = LightManagerFogEllipsoids.Get();
|
||||
CreateBuffer(ref m_FogEllipsoidParamsCB, fogEllipsoids == null ? 0 : fogEllipsoids.Count, 64);
|
||||
|
||||
CreateBuffer(ref m_DummyCB, 1, 4);
|
||||
}
|
||||
|
||||
void ReleaseTemporary(ref RenderTexture rt)
|
||||
|
Loading…
Reference in New Issue
Block a user