Ejemplo n.º 1
0
        // 插值环境属性
        private void LerpRenderSetting(DisplayEffectSetting start, DisplayEffectSetting end, float progress)
        {
            RSettingInfo startInfo = start.m_RenderSettingInfo;
            RSettingInfo endInfo   = end.m_RenderSettingInfo;

            RenderSettings.fog = endInfo.fog;
            if (endInfo.fog == false)
            {
                return;
            }

            RenderSettings.fogColor = Color.Lerp(startInfo.fogColor, endInfo.fogColor, progress);

            RenderSettings.ambientLight = Color.Lerp(startInfo.ambientLight, endInfo.ambientLight, progress);

            if (startInfo.fogMode != endInfo.fogMode)
            {
                RenderSettings.fogMode    = endInfo.fogMode;
                RenderSettings.fogDensity = endInfo.fogDensity;
                return;
            }

            RenderSettings.fogDensity       = Mathf.Lerp(startInfo.fogDensity, endInfo.fogDensity, progress);
            RenderSettings.fogStartDistance = Mathf.Lerp(startInfo.fogStartDistance, endInfo.fogStartDistance, progress);
            RenderSettings.fogEndDistance   = Mathf.Lerp(startInfo.fogEndDistance, endInfo.fogEndDistance, progress);
        }
Ejemplo n.º 2
0
 public void Generate(ref RSettingInfo info)
 {
     this.fog              = info.fog;
     this.fog              = info.fog;
     this.fogColor         = info.fogColor;
     this.fogMode          = info.fogMode;
     this.fogDensity       = info.fogDensity;
     this.fogStartDistance = info.fogStartDistance;
     this.fogEndDistance   = info.fogEndDistance;
     this.ambientLight     = info.ambientLight;
 }
Ejemplo n.º 3
0
 public void GenerateEnvInfo(ref RSettingInfo info)
 {
     m_RenderSettingInfo.Generate(ref info);
 }