浏览代码

dont use static for ComputeBuffers

/main
Filip Iliescu 7 年前
当前提交
fec938bb
共有 1 个文件被更改,包括 15 次插入8 次删除
  1. 23
      Assets/ScriptableRenderPipeline/MobileRenderPipeline/OnTileDeferredRenderPipeline.cs

23
Assets/ScriptableRenderPipeline/MobileRenderPipeline/OnTileDeferredRenderPipeline.cs


const int k_MaxPayloadSlotsPerShadowData = 4;
ShadowmapBase[] m_Shadowmaps;
ShadowManager m_ShadowMgr;
static ComputeBuffer s_ShadowDataBuffer;
static ComputeBuffer s_ShadowPayloadBuffer;
ComputeBuffer s_ShadowDataBuffer;
ComputeBuffer s_ShadowPayloadBuffer;
public ShadowSetup(ShadowInitParameters shadowInit, ShadowSettings shadowSettings, out IShadowManager shadowManager)
{

}
m_ShadowMgr = null;
if( s_ShadowDataBuffer != null )
s_ShadowDataBuffer.Release();
if( s_ShadowPayloadBuffer != null )
s_ShadowPayloadBuffer.Release();
if (s_ShadowDataBuffer != null) {
s_ShadowDataBuffer.Release ();
s_ShadowDataBuffer = null;
}
if (s_ShadowPayloadBuffer != null) {
s_ShadowPayloadBuffer.Release ();
s_ShadowPayloadBuffer = null;
}
}
}

private TextureCacheCubemap m_CubeCookieTexArray;
private TextureCacheCubemap m_CubeReflTexArray;
private static ComputeBuffer s_LightDataBuffer = null;
private ComputeBuffer s_LightDataBuffer;
private static int s_GBufferAlbedo;
private static int s_GBufferSpecRough;

if (m_ReflectionNearClipMaterial) DestroyImmediate (m_ReflectionNearClipMaterial);
if (m_ReflectionNearAndFarClipMaterial) DestroyImmediate (m_ReflectionNearAndFarClipMaterial);
s_LightDataBuffer.Release();
if (s_LightDataBuffer != null) {
s_LightDataBuffer.Release ();
s_LightDataBuffer = null;
}
m_CookieTexArray.Release();
m_CubeCookieTexArray.Release();

正在加载...
取消
保存