mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-06 17:41:04 +00:00
Fix relief mapping issues
This commit is contained in:
parent
b30e8d8ec6
commit
655fc6010f
15 changed files with 206 additions and 70 deletions
|
@ -31,6 +31,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
#include "util/numeric.h"
|
||||
|
||||
class IGameDef;
|
||||
struct TileSpec;
|
||||
struct TileDef;
|
||||
|
||||
/*
|
||||
tile.{h,cpp}: Texture handling stuff.
|
||||
|
@ -111,6 +113,7 @@ public:
|
|||
const TextureFromMeshParams ¶ms)=0;
|
||||
virtual video::ITexture* getNormalTexture(const std::string &name)=0;
|
||||
virtual video::SColor getTextureAverageColor(const std::string &name)=0;
|
||||
virtual video::ITexture *getShaderFlagsTexture(TileDef *tiledef, TileSpec *tile)=0;
|
||||
};
|
||||
|
||||
class IWritableTextureSource : public ITextureSource
|
||||
|
@ -133,6 +136,7 @@ public:
|
|||
virtual void rebuildImagesAndTextures()=0;
|
||||
virtual video::ITexture* getNormalTexture(const std::string &name)=0;
|
||||
virtual video::SColor getTextureAverageColor(const std::string &name)=0;
|
||||
virtual video::ITexture *getShaderFlagsTexture(TileDef *tiledef, TileSpec *tile)=0;
|
||||
};
|
||||
|
||||
IWritableTextureSource* createTextureSource(IrrlichtDevice *device);
|
||||
|
@ -172,12 +176,14 @@ struct FrameSpec
|
|||
FrameSpec():
|
||||
texture_id(0),
|
||||
texture(NULL),
|
||||
normal_texture(NULL)
|
||||
normal_texture(NULL),
|
||||
flags_texture(NULL)
|
||||
{
|
||||
}
|
||||
u32 texture_id;
|
||||
video::ITexture *texture;
|
||||
video::ITexture *normal_texture;
|
||||
video::ITexture *flags_texture;
|
||||
};
|
||||
|
||||
struct TileSpec
|
||||
|
@ -186,6 +192,7 @@ struct TileSpec
|
|||
texture_id(0),
|
||||
texture(NULL),
|
||||
normal_texture(NULL),
|
||||
flags_texture(NULL),
|
||||
alpha(255),
|
||||
material_type(TILE_MATERIAL_BASIC),
|
||||
material_flags(
|
||||
|
@ -252,6 +259,7 @@ struct TileSpec
|
|||
u32 texture_id;
|
||||
video::ITexture *texture;
|
||||
video::ITexture *normal_texture;
|
||||
video::ITexture *flags_texture;
|
||||
|
||||
// Vertex alpha (when MATERIAL_ALPHA_VERTEX is used)
|
||||
u8 alpha;
|
||||
|
@ -266,5 +274,4 @@ struct TileSpec
|
|||
|
||||
u8 rotation;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue