コード例 #1
0
            protected override void UpdateLightCount()
            {
                base.UpdateLightCount();

                var mixin = new ShaderMixinSource();
                mixin.Mixins.Add(new ShaderClassSource("LightClusteredPointGroup"));
                ShadowGroup?.ApplyShader(mixin);

                ShaderSource = mixin;
            }
コード例 #2
0
        /// <inheritdoc/>
        public override void UpdateLayout(string compositionName)
        {
            base.UpdateLayout(compositionName);
            ShadowGroup?.UpdateLayout(compositionName);

            if (LightLastCount != LightCurrentCount)
            {
                ShadowGroup?.UpdateLightCount(LightLastCount, LightCurrentCount);
                UpdateLightCount();
            }
        }
コード例 #3
0
        /// <inheritdoc/>
        public override void UpdateLayout(string compositionName)
        {
            base.UpdateLayout(compositionName);
            ShadowGroup?.UpdateLayout(compositionName);

            if (LightLastCount != LightCurrentCount) // TODO: PERFORMANCE: Why do these two values differ all the time even if no lights have been added/removed?
            {
                ShadowGroup?.UpdateLightCount(LightLastCount, LightCurrentCount);
                UpdateLightCount();
            }
        }
コード例 #4
0
            protected override void UpdateLightCount()
            {
                base.UpdateLightCount();

                var mixin = new ShaderMixinSource();

                mixin.Mixins.Add(new ShaderClassSource("AtmosphereLightDirectionalGroup", LightCurrentCount, "PerView.Lighting"));
                ShadowGroup?.ApplyShader(mixin);

                ShaderSource = mixin;
            }
コード例 #5
0
            protected override void UpdateLightCount()
            {
                base.UpdateLightCount();

                var mixin = new ShaderMixinSource();

                mixin.Mixins.Add(new ShaderClassSource("LightDirectionalGroup", LightCurrentCount));
                // Old fixed path kept in case we need it again later
                //mixin.Mixins.Add(new ShaderClassSource("LightDirectionalGroup", LightCurrentCount));
                //mixin.Mixins.Add(new ShaderClassSource("DirectLightGroupFixed", LightCurrentCount));
                ShadowGroup?.ApplyShader(mixin);

                ShaderSource = mixin;
            }
コード例 #6
0
            protected override void UpdateLightCount()
            {
                base.UpdateLightCount();
                TextureProjectionShaderGroupData?.UpdateLightCount(LightLastCount, LightCurrentCount);

                var mixin = new ShaderMixinSource();

                // Old fixed path kept in case we need it again later
                //mixin.Mixins.Add(new ShaderClassSource("LightSpotGroup", LightCurrentCount));
                //mixin.Mixins.Add(new ShaderClassSource("DirectLightGroupFixed", LightCurrentCount));
                mixin.Mixins.Add(new ShaderClassSource("LightSpotGroup", LightCurrentCount)); // Add the base shader for the light group.
                ShadowGroup?.ApplyShader(mixin);                                              // Add the shader for shadow mapping.
                TextureProjectionShaderGroupData?.ApplyShader(mixin);                         // Add the shader for texture projection.

                ShaderSource = mixin;
            }
コード例 #7
0
    public static void SpawnShadow(ShadowGroup obj /*, Group original*/)
    {
        Vector3 block_pos = new Vector3();

        if (ShadowGridStart == null)
        {
            ShadowGridStart = GameObject.Find("ShadowGridStart");
        }

        //      Debug.Log("ShadowGridStart->"+ ShadowGridStart.name);
        block_pos.x = ShadowGridStart.transform.localPosition.x + 4;
        block_pos.y = ShadowGridStart.transform.localPosition.y + 15;

        // original.MyShadow=(ShadowGroup)Instantiate(obj, block_pos, Quaternion.identity);
        RemoteShadow = Instantiate(obj, block_pos, Quaternion.identity);
    }
コード例 #8
0
 /// <inheritdoc/>
 public override void ApplyDrawParameters(RenderDrawContext context, int viewIndex, ParameterCollection parameters, ref BoundingBoxExt boundingBox)
 {
     base.ApplyDrawParameters(context, viewIndex, parameters, ref boundingBox);
     ShadowGroup?.ApplyDrawParameters(context, parameters, CurrentLights, ref boundingBox);
 }
コード例 #9
0
 /// <inheritdoc/>
 public override void ApplyViewParameters(RenderDrawContext context, int viewIndex, ParameterCollection parameters)
 {
     base.ApplyViewParameters(context, viewIndex, parameters);
     ShadowGroup?.ApplyViewParameters(context, parameters, CurrentLights);
 }
コード例 #10
0
 /// <inheritdoc/>
 public override void ApplyDrawParameters(FastListStruct <LightDynamicEntry>?lightList, RenderDrawContext context, int viewIndex, ParameterCollection parameters, ref BoundingBoxExt boundingBox)
 {
     base.ApplyDrawParameters(lightList, context, viewIndex, parameters, ref boundingBox);
     ShadowGroup?.ApplyDrawParameters(context, parameters, lightList.HasValue ? lightList.Value : new FastListStruct <LightDynamicEntry>(8), ref boundingBox);
 }