Пример #1
0
        public LightSun(Vector3 color, Scene scene)
        {
            Parent = scene;
            Color  = new Vector4(color, 1);

            viewInfo      = new SunViewInfo(this, maxShadowDist, maxShadowDist);
            innerViewInfo = new SunViewInfo(this, innerShadowDist, maxShadowDist);

            /*
             * viewInfo.zNear = 0.6f;
             * viewInfo.zFar = 20f;
             * viewInfo.fovy = (float)Math.PI / 2f;
             * viewInfo.updateProjectionMatrix();
             */


            viewInfo.update();
            innerViewInfo.update();

            nextFarUpdate = gameWindow.frameTime;

            createRenderObject();

            shadowQuality = Settings.Instance.video.shadowQuality;
        }
Пример #2
0
        public LightSun(Vector3 color, Scene scene)
        {
            Parent = scene;
            Color = new Vector4(color,1);

            viewInfo = new SunViewInfo(this, maxShadowDist, maxShadowDist);
            innerViewInfo = new SunViewInfo(this, innerShadowDist, maxShadowDist);
            /*
            viewInfo.zNear = 0.6f;
            viewInfo.zFar = 20f;
            viewInfo.fovy = (float)Math.PI / 2f;
            viewInfo.updateProjectionMatrix();
            */

            viewInfo.update();
            innerViewInfo.update();

            nextFarUpdate = gameWindow.frameTime;
        }
Пример #3
0
        public LightSun(Vector3 color, Scene scene)
        {
            Parent = scene;
            Color = new Vector4(color,1);

            viewInfo = new SunViewInfo(this, maxShadowDist, maxShadowDist);
            innerViewInfo = new SunViewInfo(this, innerShadowDist, maxShadowDist);
            /*
            viewInfo.zNear = 0.6f;
            viewInfo.zFar = 20f;
            viewInfo.fovy = (float)Math.PI / 2f;
            viewInfo.updateProjectionMatrix();
            */

            viewInfo.update();
            innerViewInfo.update();

            nextFarUpdate = gameWindow.frameTime;

            createRenderObject();

            shadowQuality = Settings.Instance.video.shadowQuality;
        }