GPU leaf placement fixed and enabled

This commit is contained in:
d1str4ught
2025-08-25 22:08:36 +02:00
parent 24b1ca495b
commit 67475fde15
6 changed files with 79 additions and 51 deletions

View File

@@ -34,6 +34,7 @@
///////////////////////////////////////////////////////////////////////
// Include files
#include "SpeedTreeConfig.h"
#include "SpeedTreeMaterial.h"
#include <SpeedTreeRT.h>
@@ -99,7 +100,7 @@ public:
virtual ~CSpeedTreeWrapper();
const float * GetPosition();
static void SetVertexShaders(LPDIRECT3DVERTEXDECLARATION9 dwBranchVertexShader, LPDIRECT3DVERTEXDECLARATION9 dwLeafVertexShader);
static void SetVertexShaders(LPDIRECT3DVERTEXDECLARATION9 pBranchVertexShader, LPDIRECT3DVERTEXDECLARATION9 pLeafVertexShader, LPDIRECT3DVERTEXSHADER9 pVertexShader);
// geometry
bool LoadTree(const char * pszSptFile, const BYTE * c_pbBlock = NULL, unsigned int uiBlockSize = 0, unsigned int nSeed = 1, float fSize = -1.0f, float fSizeVariance = -1.0f);
@@ -197,7 +198,8 @@ private:
CGraphicImageInstance m_CompositeImageInstance;
static LPDIRECT3DVERTEXDECLARATION9 ms_dwBranchVertexShader;
static LPDIRECT3DVERTEXDECLARATION9 ms_dwLeafVertexShader;
static LPDIRECT3DVERTEXDECLARATION9 ms_pLeafVertexShaderDecl;
static LPDIRECT3DVERTEXSHADER9 ms_pLeafVertexShader;
};
#pragma warning(pop)