Building skyboxes within the Reach profile
What would a world, virtual or otherwise, be without a sky?
In this section, we'll be adding a sky to our scene with the rather simplistic method of wrapping the world in a box, and "painting" the inside of the box to make it look like the world around us, as demonstrated in the following screenshot:
Getting ready
This recipe requires a skybox texture, as shown in the following:
The exact orientation and position of the panels for each direction isn't important, although you will need to adjust the coordinates specified in step 4 of the following recipe to match your particular skybox texture.
How to do it...
To render a skybox within the Reach profile:
1. Add a collection of helper methods to convert the given corner of a texture coordinate measured in pixels into the ratio, from zero to one, that the graphics infrastructure prefers to deal with:
private static Vector2 ScaledLeft( Rectangle portion, Rectangle whole) { return Vector2.UnitX * portion...