浏览代码

The hash is Editor-only, so make sure not to break standalone players

/stochastic_alpha_test
Evgenii Golubev 7 年前
当前提交
32790c37
共有 1 个文件被更改,包括 10 次插入1 次删除
  1. 11
      ScriptableRenderPipeline/Core/TextureCache.cs

11
ScriptableRenderPipeline/Core/TextureCache.cs


{
public uint texId;
public uint countLRU;
#if UNITY_EDITOR
#endif
};
private int m_NumTextures;

return sliceIndex;
var texId = (uint)texture.GetInstanceID();
#if UNITY_EDITOR
#endif
//assert(TexID!=g_InvalidTexID);
if (texId == g_InvalidTexID) return 0;

Debug.Assert(m_SliceArray[sliceIndex].texId == texId);
bFoundAvailOrExistingSlice = true;
#if UNITY_EDITOR
#endif
}
// If no existing copy found in the array

if (bFoundAvailOrExistingSlice)
{
m_SliceArray[sliceIndex].countLRU = 0; // mark slice as in use this frame
m_SliceArray[sliceIndex].hash = hash;
#if UNITY_EDITOR
m_SliceArray[sliceIndex].hash = hash;
#endif
// transfer new slice to sliceIndex from source texture
TransferToSlice(sliceIndex, texture);
}

正在加载...
取消
保存