浏览代码

Added reading the global overrides when launching shadow requests.

/main
uygar 7 年前
当前提交
ba8f60e4
共有 2 个文件被更改,包括 11 次插入1 次删除
  1. 4
      ScriptableRenderPipeline/Core/CoreRP/Shadow/Shadow.cs
  2. 8
      ScriptableRenderPipeline/Core/CoreRP/Shadow/ShadowBase.cs

4
ScriptableRenderPipeline/Core/CoreRP/Shadow/Shadow.cs


int sa, sv, sp;
asd.GetShadowAlgorithm( out sa, out sv, out sp );
sreq.shadowAlgorithm = ShadowUtils.Pack( (ShadowAlgorithm) sa, (ShadowVariant) sv, (ShadowPrecision) sp );
GPUShadowAlgorithm packed_algo = ShadowUtils.Pack( (ShadowAlgorithm) sa, (ShadowVariant) sv, (ShadowPrecision) sp );
GetGlobalShadowOverride( shadowType, ref packed_algo );
sreq.shadowAlgorithm = packed_algo;
totalRequestCount += (uint) facecount;
requestsGranted.AddUnchecked( sreq );
totalSlots--;

8
ScriptableRenderPipeline/Core/CoreRP/Shadow/ShadowBase.cs


{
m_GlobalOverrides[(int)shadowType].enabled = enabled;
}
public bool GetGlobalShadowOverride( GPUShadowType shadowType, ref GPUShadowAlgorithm algo )
{
if( m_GlobalOverrides[(int)shadowType].enabled )
algo = ShadowUtils.Pack( m_GlobalOverrides[(int)shadowType].algorithm, m_GlobalOverrides[(int)shadowType].variant, m_GlobalOverrides[(int)shadowType].precision );
return m_GlobalOverrides[(int)shadowType].enabled;
}
}
// This is the struct passed into shaders

正在加载...
取消
保存