public LightGroup(int index, string compositionName)
        {
            LightingParameterSemantics = new Dictionary <ParameterKey, LightParamSemantic>();
            var lightGroupSubKey = string.Format("." + compositionName + "[{0}]", index);

            foreach (var param in LightForwardModelRenderer.LightParametersDict)
            {
                LightingParameterSemantics.Add(ParameterKeys.AppendKey(param.Key, lightGroupSubKey), param.Value);
            }
        }
        private void UpdateLightingParameterSemantics(int index, string compositionName)
        {
            lightingParameterSemantics.Clear();
            var lightGroupSubKey = string.Format("." + compositionName + "[{0}]", index);

            foreach (var param in LightParametersDict)
            {
                lightingParameterSemantics.Add(ParameterKeys.AppendKey(param.Key, lightGroupSubKey), param.Value);
            }
        }
示例#3
0
        public static ShadowUpdateInfo CreateShadowUpdateInfo(int index, int level)
        {
            var info = new ShadowUpdateInfo {
                CascadeCount = level
            };

            // Prepare keys for this shadow map type
            var shadowSubKey = string.Format(".shadows[{0}]", index);

            info.ShadowMapReceiverInfoKey      = ParameterKeys.AppendKey(ShadowMapRenderer.Receivers, shadowSubKey);
            info.ShadowMapReceiverVsmInfoKey   = ParameterKeys.AppendKey(ShadowMapRenderer.ReceiversVsm, shadowSubKey);
            info.ShadowMapLevelReceiverInfoKey = ParameterKeys.AppendKey(ShadowMapRenderer.LevelReceivers, shadowSubKey);
            info.ShadowMapLightCountKey        = ParameterKeys.AppendKey(ShadowMapRenderer.ShadowMapLightCount, shadowSubKey);
            info.ShadowMapTextureKey           = ParameterKeys.AppendKey(ShadowMapKeys.Texture, shadowSubKey);

            return(info);
        }