Example #1
0
        public override void Set(Effect effect, RenderContext context, Matrix transform)
        {
            Actor             hdrLightActor = GameResources.ActorManager.GetActorById(context.SceneResources.HDRLightActorId);
            HDRLightComponent hdr           = hdrLightActor.GetComponent <HDRLightComponent>(ActorComponent.ComponentType.Light);

            EffectRegistry.Params[effect][EffectRegistry.IRRADIANCEMAP_PARAM_NAME].SetValue(hdr.IrradianceMap);
            EffectRegistry.Params[effect][EffectRegistry.ALPHA_TEST_DIRECTION_PARAM_NAME].SetValue(mIsOpaqueMode ? 1.0f : -1.0f);
            EffectRegistry.Params[effect][EffectRegistry.SECONDS_TIMER_VALUE_PARAM_NAME].SetValue(mTimer());
        }
Example #2
0
        public override void Set(Effect effect, RenderContext context, Matrix transform)
        {
            Actor             hdrLightActor = GameResources.ActorManager.GetActorById(context.SceneResources.HDRLightActorId);
            HDRLightComponent hdr           = hdrLightActor.GetComponent <HDRLightComponent>(ActorComponent.ComponentType.Light);

            EffectRegistry.Params[effect][EffectRegistry.IRRADIANCEMAP_PARAM_NAME].SetValue(hdr.IrradianceMap);
            EffectRegistry.Params[effect][EffectRegistry.SPECPREFILTER_PARAM_NAME].SetValue(hdr.SpecPrefilter);
            EffectRegistry.Params[effect][EffectRegistry.NUMSPECLEVELS_PARAM_NAME].SetValue(hdr.NumSpecLevels);
            EffectRegistry.Params[effect][EffectRegistry.SPECEXPFACTOR_PARAM_NAME].SetValue(hdr.SpecExponentFactor);
            EffectRegistry.Params[effect][EffectRegistry.AMBIENTLIGHT_PARAM_NAME].SetValue(hdr.AmbientLight);
        }
Example #3
0
        private void HDRLightCreatedHandler(object sender, EventArgs e)
        {
            HDRLightComponent hdr = sender as HDRLightComponent;

            Resources.HDRLightActorId = hdr.Owner.Id;
        }