1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Improved parallax mapping. Generate heightmaps on the fly.

This commit is contained in:
RealBadAngel 2015-06-14 21:13:36 +02:00
parent d105bf27dd
commit 43fcfbfe05
11 changed files with 310 additions and 241 deletions

View file

@ -26,6 +26,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include <map>
class IGameDef;
class IShaderSource;
/*
Mesh making stuff
@ -123,6 +124,8 @@ public:
private:
scene::SMesh *m_mesh;
IGameDef *m_gamedef;
ITextureSource *m_tsrc;
IShaderSource *m_shdrsrc;
bool m_enable_shaders;
bool m_enable_highlighting;
@ -165,13 +168,12 @@ struct PreMeshBuffer
{
TileSpec tile;
std::vector<u16> indices;
std::vector<video::S3DVertex> vertices;
std::vector<video::S3DVertexTangents> vertices;
};
struct MeshCollector
{
std::vector<PreMeshBuffer> prebuffers;
void append(const TileSpec &material,
const video::S3DVertex *vertices, u32 numVertices,
const u16 *indices, u32 numIndices);