I=(S=Skydome.DrawExposePoint = function(){
}).prototype;

I.Draw = function()
{
    var temp_unique7560 = new Uno.Float4;
    var temp_unique7559 = new Uno.Float4;
    var temp_unique7558 = new Uno.Float4;
    {
        var World_3_30_0 = this.parent.Transform.Absolute();
        var Camera_5_0_0 = Uno.Application.Camera();
        var WorldInverse_3_31_0 = Uno.Matrix.Invert_1(World_3_30_0);
        var WorldInverseTranspose_3_32_0 = Uno.Matrix.Transpose(WorldInverse_3_31_0);
        gl.useProgram(this.Draw_Sphere_prog);
        gl.colorMask(true, true, true, true);
        gl.depthMask(true);
        gl.disable(3042);
        gl.cullFace(Uno.Graphics.OpenGL.Interop.PolygonFaceToGLenum(1));
        gl.enable(2884);
        gl.enable(2929);
        gl.frontFace(Uno.Graphics.OpenGL.Interop.PolygonWindingToGLenum(1));
        gl.uniformMatrix4fv(this.Draw_Sphere_World_3_30_0_QvHwkvINys, false, uglFloat4x4(this.parent.Transform.Absolute()));
        gl.uniformMatrix4fv(this.Draw_Sphere_View_3_13_0_YvWhRcwFVs, false, uglFloat4x4(Camera_5_0_0.View()));
        gl.uniformMatrix4fv(this.Draw_Sphere_Proj_3_14_0_RiguPhXAOF, false, uglFloat4x4(Camera_5_0_0.Proj()));
        gl.uniformMatrix3fv(this.Draw_Sphere_World3x3_3_33_0_NwDNuHpnGc, false, uglFloat3x3(Uno.Float3x3.$1((temp_unique7558 = WorldInverseTranspose_3_32_0.indexer(0), Uno.Float3.$1(temp_unique7558.X, temp_unique7558.Y, temp_unique7558.Z)), (temp_unique7559 = WorldInverseTranspose_3_32_0.indexer(1), Uno.Float3.$1(temp_unique7559.X, temp_unique7559.Y, temp_unique7559.Z)), (temp_unique7560 = WorldInverseTranspose_3_32_0.indexer(2), Uno.Float3.$1(temp_unique7560.X, temp_unique7560.Y, temp_unique7560.Z)))));
        gl.activeTexture(33984);
        gl.bindTexture(3553, this.Draw_Sphere_bg_8_0_0_yiZSStLYnT_val.GLHandle());
        gl.uniform1i(this.Draw_Sphere_bg_8_0_0_yiZSStLYnT, 0);
        gl.enableVertexAttribArray(this.Draw_Sphere_VertexPosition_oCcnWkcygm);
        gl.bindBuffer(34962, this.Draw_Sphere_VertexPosition_oCcnWkcygm_vbo.GLHandle());
        gl.vertexAttribPointer(this.Draw_Sphere_VertexPosition_oCcnWkcygm, 3, 5126, false, 0, 0);
        gl.enableVertexAttribArray(this.Draw_Sphere_VertexNormal_shhSjTGUvU);
        gl.bindBuffer(34962, this.Draw_Sphere_VertexNormal_shhSjTGUvU_vbo.GLHandle());
        gl.vertexAttribPointer(this.Draw_Sphere_VertexNormal_shhSjTGUvU, 3, 5126, false, 0, 0);
        gl.bindBuffer(34963, this.Draw_Sphere_ibo.GLHandle());
        gl.drawElements(Uno.Graphics.OpenGL.Interop.PrimitiveTypeToGLenum(0), this.Draw_Sphere_Length_BceURcbVDm, 5123, 0);
        gl.disableVertexAttribArray(this.Draw_Sphere_VertexPosition_oCcnWkcygm);
        gl.disableVertexAttribArray(this.Draw_Sphere_VertexNormal_shhSjTGUvU);
        Uno.Application.IncrementDrawCallCounter(this.Draw_Sphere_Length_BceURcbVDm);
    }
};

S.$0 = function(parent, $this) {
    if (!$this) $this = new Skydome.DrawExposePoint;
    {
        $this.parent = parent;
    }

    {
        var Mesh_8_1_0 = Uno.Content.MeshGenerator.CreateSphere(Uno.Float3.$1(0.0, 0.0, 0.0), 1500.0, 20, 20);
        var MeshIndices_3_1_0 = Mesh_8_1_0.GetUShortIndices();
        $this.Draw_Sphere_ibo = Uno.Graphics.IndexBuffer.$0(MeshIndices_3_1_0.length * 2, false);
        $this.Draw_Sphere_ibo.SetData(new Uint16Array(MeshIndices_3_1_0));
        $this.Draw_Sphere_VertexPosition_oCcnWkcygm_vbo = Uno.Graphics.VertexBuffer.$0(Mesh_8_1_0.Vertices.length * 12, false);
        $this.Draw_Sphere_VertexPosition_oCcnWkcygm_vbo.SetData(uglFloat3Array(Mesh_8_1_0.Vertices, (Mesh_8_1_0.Vertices.length * 12)/12));
        $this.Draw_Sphere_VertexNormal_shhSjTGUvU_vbo = Uno.Graphics.VertexBuffer.$0(Mesh_8_1_0.Normals.length * 12, false);
        $this.Draw_Sphere_VertexNormal_shhSjTGUvU_vbo.SetData(uglFloat3Array(Mesh_8_1_0.Normals, (Mesh_8_1_0.Normals.length * 12)/12));
        $this.Draw_Sphere_bg_8_0_0_yiZSStLYnT_val = Uno.ResourceManager.GetResource("bg_zEJXTYAeaf");
        $this.Draw_Sphere_Length_BceURcbVDm = MeshIndices_3_1_0.length;
    }

    $this.Draw_Sphere_vs = uglCompileShader(35633, "Skydome_DrawExposePoint_Draw_Sphere_vs", "uniform mat4 World_3_30_0_QvHwkvINys;\nuniform mat4 View_3_13_0_YvWhRcwFVs;\nuniform mat4 Proj_3_14_0_RiguPhXAOF;\nuniform mat3 World3x3_3_33_0_NwDNuHpnGc;\n\nvarying vec2 WorldNormal_3_38_0_BsFPZKbnkV;\n\nattribute vec3 VertexPosition_oCcnWkcygm;\nattribute vec3 VertexNormal_shhSjTGUvU;\n\nvoid main(void)\n{\n\tvec3 VertexPosition_3_2_0 = VertexPosition_oCcnWkcygm;\n\tvec3 WorldPosition_3_37_0 = (World_3_30_0_QvHwkvINys * vec4(VertexPosition_oCcnWkcygm,1.)).xyz;\n\tvec3 ViewPosition_3_18_0 = (View_3_13_0_YvWhRcwFVs * vec4(WorldPosition_3_37_0, 1.0)).xyz;\n\tvec4 ClipPosition_3_19_0 = Proj_3_14_0_RiguPhXAOF * vec4(ViewPosition_3_18_0, 1.0);\n\tgl_Position = Proj_3_14_0_RiguPhXAOF * vec4(ViewPosition_3_18_0, 1.0);\n\tvec3 VertexNormal_3_3_0 = VertexNormal_shhSjTGUvU;\n\tvec3 WorldNormal_3_38_0 = normalize(World3x3_3_33_0_NwDNuHpnGc * VertexNormal_shhSjTGUvU);\n\tWorldNormal_3_38_0_BsFPZKbnkV = WorldNormal_3_38_0.xy;\n}\n");
    $this.Draw_Sphere_ps = uglCompileShader(35632, "Skydome_DrawExposePoint_Draw_Sphere_ps", "uniform sampler2D bg_8_0_0_yiZSStLYnT;\n\nvarying vec2 WorldNormal_3_38_0_BsFPZKbnkV;\n\nvoid main(void)\n{\n\tvec4 PixelColor_8_4_0 = texture2D(bg_8_0_0_yiZSStLYnT, WorldNormal_3_38_0_BsFPZKbnkV);\n\tgl_FragColor = texture2D(bg_8_0_0_yiZSStLYnT, WorldNormal_3_38_0_BsFPZKbnkV);\n}\n");
    $this.Draw_Sphere_prog = uglLinkProgram($this.Draw_Sphere_vs, $this.Draw_Sphere_ps);
    $this.Draw_Sphere_VertexPosition_oCcnWkcygm = gl.getAttribLocation($this.Draw_Sphere_prog, "VertexPosition_oCcnWkcygm");
    $this.Draw_Sphere_VertexNormal_shhSjTGUvU = gl.getAttribLocation($this.Draw_Sphere_prog, "VertexNormal_shhSjTGUvU");
    $this.Draw_Sphere_World_3_30_0_QvHwkvINys = gl.getUniformLocation($this.Draw_Sphere_prog, "World_3_30_0_QvHwkvINys");
    $this.Draw_Sphere_View_3_13_0_YvWhRcwFVs = gl.getUniformLocation($this.Draw_Sphere_prog, "View_3_13_0_YvWhRcwFVs");
    $this.Draw_Sphere_Proj_3_14_0_RiguPhXAOF = gl.getUniformLocation($this.Draw_Sphere_prog, "Proj_3_14_0_RiguPhXAOF");
    $this.Draw_Sphere_World3x3_3_33_0_NwDNuHpnGc = gl.getUniformLocation($this.Draw_Sphere_prog, "World3x3_3_33_0_NwDNuHpnGc");
    $this.Draw_Sphere_bg_8_0_0_yiZSStLYnT = gl.getUniformLocation($this.Draw_Sphere_prog, "bg_8_0_0_yiZSStLYnT");
    return $this;
};
