浏览代码

Null pointer exception fix when no directional light in the scene.

/Add-support-for-light-specular-color-tint
Julien Ignace 7 年前
当前提交
58ea35a7
共有 2 个文件被更改,包括 4 次插入2 次删除
  1. 2
      ScriptableRenderPipeline/HDRenderPipeline/Lighting/ReflectionProbeCache.cs
  2. 4
      ScriptableRenderPipeline/HDRenderPipeline/Sky/SkyManager.cs

2
ScriptableRenderPipeline/HDRenderPipeline/Lighting/ReflectionProbeCache.cs


if (result == null)
return -1;
m_TextureCache.UpdateSlice(cmd, sliceIndex, m_ConvolutionTargetTexture, m_TextureCache.GetTextureUpdateCount(texture)); // Be careful to provide the update count from the input texture, not the temporary one used for convolving.
m_TextureCache.UpdateSlice(cmd, sliceIndex, result, m_TextureCache.GetTextureUpdateCount(texture)); // Be careful to provide the update count from the input texture, not the temporary one used for convolving.
m_ProbeBakingState[sliceIndex] = ProbeFilteringState.Ready;
}

4
ScriptableRenderPipeline/HDRenderPipeline/Sky/SkyManager.cs


m_BuiltinParameters.screenSize = m_CubemapScreenSize;
m_BuiltinParameters.cameraPosWS = camera.camera.transform.position;
int sunHash = (sunLight.GetHashCode() * 23 + sunLight.transform.position.GetHashCode()) * 23 + sunLight.transform.rotation.GetHashCode();
int sunHash = 0;
if(sunLight != null)
sunHash = (sunLight.GetHashCode() * 23 + sunLight.transform.position.GetHashCode()) * 23 + sunLight.transform.rotation.GetHashCode();
int skyHash = sunHash * 23 + skySettings.GetHashCode();
if (m_UpdatedFramesRequired > 0 ||

正在加载...
取消
保存