mirror of
https://github.com/RetroDECK/Supermodel.git
synced 2025-02-16 17:35:39 +00:00
Only check the geometry for culling with valid node distances. We will need this later.
This commit is contained in:
parent
fe60d115d2
commit
abc8c24b69
|
@ -432,12 +432,21 @@ void CNew3D::DescendCullingNode(UINT32 addr)
|
|||
|
||||
if (m_nodeAttribs.currentClipStatus != Clip::INSIDE) {
|
||||
|
||||
float distance = R3DFloat::GetFloat16(node[9 - m_offset] & 0xFFFF);
|
||||
//================
|
||||
UINT16 hDistance;
|
||||
float fDistance;
|
||||
//================
|
||||
|
||||
CalcBox(distance, bbox);
|
||||
TransformBox(m_modelMat, bbox);
|
||||
hDistance = node[9 - m_offset] & 0xFFFF;
|
||||
fDistance = R3DFloat::GetFloat16(node[9 - m_offset] & 0xFFFF);
|
||||
|
||||
m_nodeAttribs.currentClipStatus = ClipBox(bbox, m_planes);
|
||||
if (hDistance != R3DFloat::Pro16BitMax) {
|
||||
|
||||
CalcBox(fDistance, bbox);
|
||||
TransformBox(m_modelMat, bbox);
|
||||
|
||||
m_nodeAttribs.currentClipStatus = ClipBox(bbox, m_planes);
|
||||
}
|
||||
}
|
||||
|
||||
if (m_nodeAttribs.currentClipStatus != Clip::OUTSIDE) {
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
|
||||
namespace R3DFloat
|
||||
{
|
||||
static const UINT16 Pro16BitMax = 0x7fff;
|
||||
|
||||
float GetFloat16(UINT16 f);
|
||||
float GetFloat32(UINT32 f);
|
||||
|
||||
|
|
Loading…
Reference in a new issue