MCPcopy Create free account
hub / github.com/bfbbdecomp/bfbb / distance_cull

Method distance_cull

src/SB/Game/zDiscoFloor.cpp:953–981  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

951}
952
953void z_disco_floor::distance_cull()
954{
955 xVec3& cam_loc = globals.camera.mat.pos;
956 xVec3 offset = bound.center - cam_loc;
957
958 F32 dist = offset.length();
959
960 F32 max_update_dist = cull_dist_update + bound.r;
961
962 flag.culled = (dist >= max_update_dist);
963
964 F32 min_glow_dist = cull_dist_glow + bound.r;
965 F32 max_glow_dist = 10.0f + min_glow_dist;
966
967 flag.glow_culled = (dist >= max_glow_dist);
968
969 if (dist <= min_glow_dist)
970 {
971 glow_fade = 1.0f;
972 }
973 else if (dist >= max_glow_dist)
974 {
975 glow_fade = 0.0f;
976 }
977 else
978 {
979 glow_fade = 0.1f * (max_glow_dist - dist);
980 }
981}
982
983void z_disco_floor::render(S32 group)
984{

Callers

nothing calls this directly

Calls 1

lengthMethod · 0.80

Tested by

no test coverage detected