浏览代码

Removed sunlight from baking sky computation (can cause discrepancy while baking depending on its current state in the scene and we usually don't want it in the bake anyway to avoid double highlights)

/main
Julien Ignace 7 年前
当前提交
189abf5e
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 4
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Sky/SkyManager.cs

4
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Sky/SkyManager.cs


UpdateSkyTypes();
UpdateCurrentSkySettings(camera);
m_NeedUpdateBakingSky = m_BakingSkyRenderingContext.UpdateEnvironment(m_BakingSky, camera, sunLight, m_UpdateRequired, cmd);
// For the baking sky, we don't want to take the sun into account because we usually won't include it (this would cause double highlight in the reflection for example).
// So we pass null so that's it doesn't affect the hash and the rendering.
m_NeedUpdateBakingSky = m_BakingSkyRenderingContext.UpdateEnvironment(m_BakingSky, camera, null, m_UpdateRequired, cmd);
SkyUpdateContext currentSky = m_LightingOverrideSky.IsValid() ? m_LightingOverrideSky : m_VisualSky;
m_NeedUpdateRealtimeEnv = m_SkyRenderingContext.UpdateEnvironment(currentSky, camera, sunLight, m_UpdateRequired, cmd);

正在加载...
取消
保存