浏览代码

Tentative fix for additive scene loading breaking the "bake sky"

/feature-ReflectionProbeFit
Julien Ignace 7 年前
当前提交
52a9d332
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 3
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Sky/SkyManager.cs

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


cmd.SetGlobalTexture(HDShaderIDs._SkyTexture, CoreUtils.magentaCubeTexture);
// This is done here because we need to wait for one frame that the command buffer is executed before using the resulting textures.
if (m_NeedUpdateBakingSky)
// Testing the current skybox material is because we have to make sure that additive scene loading or even some user script haven't altered it.
if (m_NeedUpdateBakingSky || (RenderSettings.skybox != m_StandardSkyboxMaterial))
{
// Here we update the global SkyMaterial so that it uses our baking sky cubemap. This way, next time the GI is baked, the right sky will be present.
float intensity = m_BakingSky.IsValid() ? 1.0f : 0.0f; // Eliminate all diffuse if we don't have a skybox (meaning for now the background is black in HDRP)

正在加载...
取消
保存