浏览代码

Merge pull request #1427 from Unity-Technologies/Fix-issue-with-emissioncolor

Fix issue with emissionColor not reset to white in material reset
/main
GitHub 6 年前
当前提交
5a490473
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3
      com.unity.render-pipelines.high-definition/HDRP/Editor/Material/Unlit/BaseUnlitUI.cs

3
com.unity.render-pipelines.high-definition/HDRP/Editor/Material/Unlit/BaseUnlitUI.cs


// A material's GI flag internally keeps track of whether emission is enabled at all, it's enabled but has no effect
// or is enabled and may be modified at runtime. This state depends on the values of the current flag and emissive color.
// The fixup routine makes sure that the material is in the correct state if/when changes are made to the mode or color.
if (material.HasProperty(kEmissionColor))
material.SetColor(kEmissionColor, Color.white); // kEmissionColor must always be white to allow our own material to control the GI (this allow to fallback from builtin unity to our system).
// as it happen with old material that it isn't the case, we force it.
MaterialEditor.FixupEmissiveFlag(material);
// Commented out for now because unfortunately we used the hard coded property names used by the GI system for our own parameters

正在加载...
取消
保存