mirror of
https://github.com/RetroDECK/Supermodel.git
synced 2024-11-25 15:15:40 +00:00
add LOD table data. Maybe we can get clipping planes out of these
This commit is contained in:
parent
e79b241a49
commit
aee89390ba
|
@ -648,6 +648,8 @@ void CNew3D::RenderViewport(UINT32 addr, int pri)
|
|||
vpHeight = (vpnode[0x14] >> 18) & 0x3FFF; // height (14.2)
|
||||
matrixBase = vpnode[0x16] & 0xFFFFFF; // matrix base address
|
||||
|
||||
LODBlendTable* tableTest = (LODBlendTable*)TranslateCullingAddress(vpnode[0x17]);
|
||||
|
||||
// Field of view and clipping
|
||||
vpTopAngle = (float)asin(*(float *)&vpnode[0x0E]); // FOV Y upper half-angle (radians)
|
||||
vpBotAngle = (float)asin(*(float *)&vpnode[0x12]); // FOV Y lower half-angle
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
#include "Mat4.h"
|
||||
#include "R3DShader.h"
|
||||
#include "VBO.h"
|
||||
#include "R3DData.h"
|
||||
|
||||
namespace New3D {
|
||||
|
||||
|
|
20
Src/Graphics/New3D/R3DData.h
Normal file
20
Src/Graphics/New3D/R3DData.h
Normal file
|
@ -0,0 +1,20 @@
|
|||
#ifndef _R3DDATA_H_
|
||||
#define _R3DDATA_H_
|
||||
|
||||
struct LOD
|
||||
{
|
||||
float startRange; // possibly specified as angles also, yeah who knows >_<
|
||||
float deleteRange;
|
||||
};
|
||||
|
||||
struct LODFeatureType
|
||||
{
|
||||
LOD lod[4];
|
||||
};
|
||||
|
||||
struct LODBlendTable
|
||||
{
|
||||
LODFeatureType table[128];
|
||||
};
|
||||
|
||||
#endif
|
Loading…
Reference in a new issue