mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-22 17:18:39 +00:00
Real global textures (#6105)
* Real global textures * Add world-aligned textures * Update minimal to support world-aligned tiles * Update minimal
This commit is contained in:
parent
6bab695479
commit
75320e7e88
26 changed files with 469 additions and 160 deletions
|
@ -125,9 +125,25 @@ enum LeavesStyle {
|
|||
LEAVES_OPAQUE,
|
||||
};
|
||||
|
||||
enum AutoScale : u8 {
|
||||
AUTOSCALE_DISABLE,
|
||||
AUTOSCALE_ENABLE,
|
||||
AUTOSCALE_FORCE,
|
||||
};
|
||||
|
||||
enum WorldAlignMode : u8 {
|
||||
WORLDALIGN_DISABLE,
|
||||
WORLDALIGN_ENABLE,
|
||||
WORLDALIGN_FORCE,
|
||||
WORLDALIGN_FORCE_NODEBOX,
|
||||
};
|
||||
|
||||
class TextureSettings {
|
||||
public:
|
||||
LeavesStyle leaves_style;
|
||||
WorldAlignMode world_aligned_mode;
|
||||
AutoScale autoscale_mode;
|
||||
int node_texture_size;
|
||||
bool opaque_water;
|
||||
bool connected_glass;
|
||||
bool use_normal_texture;
|
||||
|
@ -198,6 +214,12 @@ enum PlantlikeStyle {
|
|||
PLANT_STYLE_HASH2,
|
||||
};
|
||||
|
||||
enum AlignStyle : u8 {
|
||||
ALIGN_STYLE_NODE,
|
||||
ALIGN_STYLE_WORLD,
|
||||
ALIGN_STYLE_USER_DEFINED,
|
||||
};
|
||||
|
||||
/*
|
||||
Stand-alone definition of a TileSpec (basically a server-side TileSpec)
|
||||
*/
|
||||
|
@ -212,6 +234,8 @@ struct TileDef
|
|||
bool has_color = false;
|
||||
//! The color of the tile.
|
||||
video::SColor color = video::SColor(0xFFFFFFFF);
|
||||
AlignStyle align_style = ALIGN_STYLE_NODE;
|
||||
u8 scale = 0;
|
||||
|
||||
struct TileAnimationParams animation;
|
||||
|
||||
|
@ -401,9 +425,6 @@ struct ContentFeatures
|
|||
}
|
||||
|
||||
#ifndef SERVER
|
||||
void fillTileAttribs(ITextureSource *tsrc, TileLayer *tile, TileDef *tiledef,
|
||||
u32 shader_id, bool use_normal_texture, bool backface_culling,
|
||||
u8 material_type);
|
||||
void updateTextures(ITextureSource *tsrc, IShaderSource *shdsrc,
|
||||
scene::IMeshManipulator *meshmanip, Client *client, const TextureSettings &tsettings);
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue