1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2024-11-25 17:54:15 +00:00

Improve cull mesh type doc

This commit is contained in:
Dragorn421 2022-06-16 20:29:01 +02:00
parent 6fae6a708f
commit e4fe9d63cd
No known key found for this signature in database
GPG key ID: 32B53D2D16FC4118

View file

@ -76,6 +76,15 @@ typedef struct MeshHeaderCullEntryLinked {
/* 0x0C */ struct MeshHeaderCullEntryLinked* next;
} MeshHeaderCullEntryLinked; // size = 0x10
/**
* Handle room drawing for the "cull" type of mesh header.
*
* Each entry referenced by the header is attached to display lists, and a position and radius indicating the volume
* those display lists take.
* The first step is Z-sorting the entries, also excluding the entries which bounding sphere is entirely before or
* beyond the rendered depth range.
* The second step is drawing the entries that are left, in ascending depth.
*/
void Room_DrawCullMeshes(PlayState* play, Room* room, u32 flags) {
MeshHeaderCull* meshHeaderCull;
MeshHeaderCullEntry* meshHeaderCullEntry;
@ -137,7 +146,7 @@ void Room_DrawCullMeshes(PlayState* play, Room* room, u32 flags) {
// Compute the depth at which this entry starts
entryStartZ = projectedPos.z - meshHeaderCullEntry->radius;
// If the entry isn't fully after the rendered depth range
// If the entry isn't fully beyond the rendered depth range
if (entryStartZ < play->lightCtx.fogFar) {
// This entry will be rendered