add LOD table data. Maybe we can get clipping planes out of these

This commit is contained in:
Ian Curtis 2016-03-28 20:11:46 +00:00
parent e79b241a49
commit aee89390ba
3 changed files with 23 additions and 0 deletions

View file

@ -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

View file

@ -36,6 +36,7 @@
#include "Mat4.h"
#include "R3DShader.h"
#include "VBO.h"
#include "R3DData.h"
namespace New3D {

View 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