浏览代码

Merge pull request #601 from Unity-Technologies/Branch_ShadowAndSkyBugfix

Branch shadow and sky bugfix
/main
GitHub 7 年前
当前提交
a2f65464
共有 2 个文件被更改,包括 5 次插入3 次删除
  1. 1
      ScriptableRenderPipeline/Core/Shadow/Shadow.cs
  2. 7
      ScriptableRenderPipeline/HDRenderPipeline/Sky/SkyManager.cs

1
ScriptableRenderPipeline/Core/Shadow/Shadow.cs


{
m_Shadowmap = new RenderTexture( (int) m_Width, (int) m_Height, (int) m_ShadowmapBits, m_ShadowmapFormat, RenderTextureReadWrite.Linear );
CreateShadowmap( m_Shadowmap );
m_Shadowmap.Create();
}
virtual protected void CreateShadowmap( RenderTexture shadowmap )

7
ScriptableRenderPipeline/HDRenderPipeline/Sky/SkyManager.cs


using (new ProfilingSample(cmd, "DynamicGI.UpdateEnvironment"))
{
// TODO: Properly send the cubemap to Enlighten. Currently workaround is to set the cubemap in a Skybox/cubemap material
float intensity = IsSkyValid() ? 1.0f : 0.0f; // Eliminate all diffuse if we don't have a skybox (meaning for now the background is black in HDRP)
RenderSettings.skybox = IsSkyValid() ? m_StandardSkyboxMaterial : null; // Setup this material as the default to be use in RenderSettings
RenderSettings.ambientIntensity = 1.0f; // fix this to 1, this parameter should not exist!
RenderSettings.skybox = m_StandardSkyboxMaterial; // Setup this material as the default to be use in RenderSettings
RenderSettings.ambientIntensity = intensity;
RenderSettings.reflectionIntensity = 1.0f;
RenderSettings.reflectionIntensity = intensity;
RenderSettings.customReflection = null;
DynamicGI.UpdateEnvironment();

正在加载...
取消
保存