浏览代码

Merge branch 'Unity-2017.3' into refactor-episode-2

/stochastic_alpha_test
Thomas 7 年前
当前提交
9fc4d697
共有 7 个文件被更改,包括 28 次插入15 次删除
  1. 21
      ScriptableRenderPipeline/Core/TextureCache.cs
  2. 4
      ScriptableRenderPipeline/HDRenderPipeline/Debug/DebugDisplayLatlong.shader
  3. 4
      ScriptableRenderPipeline/HDRenderPipeline/Debug/DebugFullScreen.shader
  4. 2
      ScriptableRenderPipeline/HDRenderPipeline/SceneSettings/Resources/DrawSssProfile.shader
  5. 2
      ScriptableRenderPipeline/HDRenderPipeline/SceneSettings/Resources/DrawTransmittanceGraph.shader
  6. 6
      ScriptableRenderPipeline/HDRenderPipeline/Sky/GGXConvolve.shader
  7. 4
      ScriptableRenderPipeline/HDRenderPipeline/Sky/HDRISky/Resources/SkyHDRI.shader

21
ScriptableRenderPipeline/Core/TextureCache.cs


private struct SSliceEntry
{
public uint texId;
public uint countLRU;
public uint texId;
public uint countLRU;
#if UNITY_EDITOR
public Hash128 hash;
#endif
};
private int m_NumTextures;

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

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

}
}
// wrap up
Debug.Assert(bFoundAvailOrExistingSlice, "The texture cache doesn't have enough space to store all textures. Please either increase the size of the texture cache, or use fewer unique textures.");
if (bFoundAvailOrExistingSlice)

if (bSwapSlice) // if this was a miss
{
#if UNITY_EDITOR
m_SliceArray[sliceIndex].hash = hash;
#endif
// transfer new slice to sliceIndex from source texture
TransferToSlice(sliceIndex, texture);
}

4
ScriptableRenderPipeline/HDRenderPipeline/Debug/DebugDisplayLatlong.shader


Pass
{
ZWrite Off
ZTest Off
Blend One Zero
ZTest Always
Blend Off
Cull Off
HLSLPROGRAM

4
ScriptableRenderPipeline/HDRenderPipeline/Debug/DebugFullScreen.shader


Pass
{
ZWrite Off
ZTest Off
Blend One Zero
ZTest Always
Blend Off
Cull Off
HLSLPROGRAM

2
ScriptableRenderPipeline/HDRenderPipeline/SceneSettings/Resources/DrawSssProfile.shader


Pass
{
Cull Off
ZTest Off
ZTest Always
ZWrite Off
Blend Off

2
ScriptableRenderPipeline/HDRenderPipeline/SceneSettings/Resources/DrawTransmittanceGraph.shader


Pass
{
Cull Off
ZTest Off
ZTest Always
ZWrite Off
Blend Off

6
ScriptableRenderPipeline/HDRenderPipeline/Sky/GGXConvolve.shader


{
Pass
{
Cull Off
ZTest Always
ZTest Always
Blend One Zero
Cull Off
Blend Off
HLSLPROGRAM
#pragma target 4.5

4
ScriptableRenderPipeline/HDRenderPipeline/Sky/HDRISky/Resources/SkyHDRI.shader


{
ZWrite Off
ZTest Always
Blend One Zero
Blend Off
Cull Off
HLSLPROGRAM

{
ZWrite Off
ZTest LEqual
Blend One Zero
Blend Off
Cull Off
HLSLPROGRAM

正在加载...
取消
保存