浏览代码

Merge pull request #444 from EvgeniiG/Unity-2017.3

Fix reflection probe updates by checking the texture hash
/stochastic_alpha_test
GitHub 7 年前
当前提交
512e102e
共有 1 个文件被更改,包括 8 次插入4 次删除
  1. 12
      ScriptableRenderPipeline/Core/TextureCache.cs

12
ScriptableRenderPipeline/Core/TextureCache.cs


private struct SSliceEntry
{
public uint texId;
public uint countLRU;
public uint texId;
public uint countLRU;
public Hash128 hash;
};
private int m_NumTextures;

return sliceIndex;
var texId = (uint)texture.GetInstanceID();
var hash = texture.imageContentsHash;
//assert(TexID!=g_InvalidTexID);
if (texId == g_InvalidTexID) return 0;

if (m_LocatorInSliceArray.TryGetValue(texId, out cachedSlice))
{
sliceIndex = cachedSlice;
bFoundAvailOrExistingSlice = true;
bFoundAvailOrExistingSlice = true;
bSwapSlice = bSwapSlice || (m_SliceArray[sliceIndex].hash != hash);
}
// If no existing copy found in the array

}
}
m_SliceArray[sliceIndex].hash = hash;
if (bSwapSlice) // if this was a miss
{

正在加载...
取消
保存