/*  For graph of f(x)=sin(x) and f(x)=cos(x)
         *  where time = [0, 24]
         *
         *  22-2: No sun
         *  2-7, 16-22: sun-rise, sun-set
         *  7-17: day
         *  -- -- --
         *  where time = [0, 2pi] (y-axis)
         *
         *  sun-rise: [0, pi/4]
         *  day: [pi/4, 1.32]
         *  sun-set: [1.32, pi]
         *  night: [pi, 2pi]
         */

        public SkyboxRenderer(MasterRenderer master)
            : base(master)
        {
            cube   = new SimpleMesh(BufferUsageHint.StaticDraw, 3, VERTICES);
            skyMap = GLoader.LoadTexture("Textures/skyMap.png", TextureMinFilter.Nearest, TextureMagFilter.Nearest);
            shader = new SkyboxShader();
        }
Пример #2
0
        public GuiRenderer(MasterRenderer master)
            : base(master)
        {
            float[] positions = new float[]
            {
                -1, 1,  // top left
                -1, -1, // bottom left
                1, 1,   // top right
                1, -1   // bottom right
            };

            Quad             = new SimpleMesh(BufferUsageHint.StaticDraw, 2, positions);
            shader           = new GuiShader();
            depthDebugShader = new DepthDebugShader();
        }