This project is read-only.

unreleased 1.4 version



A skybox is a Texture Cube drawn in a box around the camera that make it look there is a sky and horizon even. For a skybox to be drawn in Nine it needs to have a texture cube loaded, if there is no texture it wont be drawn to the screen.

Skybox currently won't show up on Windows Phone.




Xaml Scene

<SkyBox Texture="{ContentReference ../Textures/SkyCubeMap}" />

Here we simply add a Skybox and apply a texture.


<SkyBox Texture="{ContentReference ../Textures/SkyCubeMap}" Color="1,1,0" />

Here we specify the color to make the Skybox look green. The Color is a Vector3. 




Code Example


Skybox skybox; // The Skybox

// Your loading Function
protected override void LoadContent()
    skybox = new Skybox(GraphicsDevice);

    // You have to apply a texture to the skybox
    skybox.Texture = Content.load<TextureCube>("Textures/SkyCubeMap");
    // If you want to can change the Color
    skybox.Color = Color.Green.ToVector3();

// Your Draw/Render Function
protected override void Draw(GameTime gameTime)
    // ...

    // Skybox cannot be rendered using other material then SkyBoxMaterial
    skybox.Draw(drawingContext, null);

Last edited Aug 16, 2012 at 10:35 PM by ChFlashER, version 8


No comments yet.