DrawSky
function · lighting · primitive
- Address
0x6d4940· 824 bytes, up to0x6d4c77- Meaning
- Draws the stars, discs, gradient and clouds in the far depth slice, then the skyboxes
- Confidence
- verified, proof one
- Finding
- lighting/sky#sky-pass
Finding: Sky pass in lighting: sky
When the sky is on, the pass sets the depth range to [0.975, 0.98] and draws, in order, the stars, the sun disc, the white moon, moon02, the gradient dome and the clouds, unless a loaded skybox has a weight above 0.99. It then draws the skyboxes and restores the viewport. The world scene runs it before the terrain and map objects when the camera is dry, and the low-detail areas run it too.
The derivation is in the doc.
Callers 2
- DrawWorldScene terrain
- DrawScreenOverlay terrain
Callees 15
- OsGetAsyncTimeMs core
- ClearDevice gx
- SetDeviceViewport gx
- GetDeviceViewport gx
- M2SceneAdvance models
- M2SceneAnimateAndCollect models
- M2SceneDraw models
- CM2Model::IsReady models
- CM2Model::SetAnimated models
- CM2Model::SetVisible models
- CM2Model::SetAlpha models
- DrawDisc lighting
- DrawSkyGradient lighting
- DrawClouds lighting
- DrawStars lighting
Calls and jumps by a bare address, from tables/calls.tsv.