AcTools.Render.Kn5SpecificDeferred.Kn5ObjectRenderer.DrawPrepare C# (CSharp) Method

DrawPrepare() protected method

protected DrawPrepare ( ) : void
return void
        protected override void DrawPrepare() {
            base.DrawPrepare();

            _effect.FxAmbientDown.Set(AmbientLower);
            _effect.FxAmbientRange.Set(AmbientUpper - AmbientLower);

            if (Sun != null) {
                _effect.FxDirectionalLightDirection.Set(Sun.Direction);
                _effect.FxLightColor.Set(AmbientLight(Sun.Color));
            } else {
                _effect.FxDirectionalLightDirection.Set(Vector3.Zero);
                _effect.FxLightColor.Set(Vector3.Zero);
            }
        }