CHAPTER 2 ■ SETTING UP DIFFERENT CAMERA MODES IN YOUR 3D WORLD
81
This struct defines a custom vertex format, capable of storing only one Vector3 that will
holdthePositiondata.Whendefiningtheverticesoftheskybox,itisnecessarytotakethe
winding order of the triangles into account, or some faces will be culled away. To learn more
about culling, see recipe 5-6. When the camera is inside the skybox, none of the faces should
be culled away, so all triangles must be wound in clockwise order, as seen by the camera inside
thebox.Tomakethingseasier,Ihavegiventheeightcornerpointsofthecubeaname,rela-
tive to the camera in the center of the cube:
Vector3 forwardBottomLeft = new Vector3(-1, -1, -1);
Vector3 forwardBottomRight ...