1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-13 08:35:20 +02:00

Cleanup shader generation code (#10663)

Shader generation is a mess. This commit cleans some parts up, including dropping remains of HLSL support which was never actually implemented.
This commit is contained in:
Vitaliy
2020-12-19 22:57:10 +03:00
committed by GitHub
parent 664f5ce960
commit ccbf8029ea
11 changed files with 157 additions and 377 deletions

View File

@@ -774,7 +774,7 @@ void ContentFeatures::updateTextures(ITextureSource *tsrc, IShaderSource *shdsrc
bool is_liquid = false;
u8 material_type = (alpha == 255) ?
MaterialType material_type = (alpha == 255) ?
TILE_MATERIAL_BASIC : TILE_MATERIAL_ALPHA;
switch (drawtype) {
@@ -892,7 +892,7 @@ void ContentFeatures::updateTextures(ITextureSource *tsrc, IShaderSource *shdsrc
u32 tile_shader = shdsrc->getShader("nodes_shader", material_type, drawtype);
u8 overlay_material = material_type;
MaterialType overlay_material = material_type;
if (overlay_material == TILE_MATERIAL_OPAQUE)
overlay_material = TILE_MATERIAL_BASIC;
else if (overlay_material == TILE_MATERIAL_LIQUID_OPAQUE)
@@ -913,7 +913,7 @@ void ContentFeatures::updateTextures(ITextureSource *tsrc, IShaderSource *shdsrc
tdef[j].backface_culling, tsettings);
}
u8 special_material = material_type;
MaterialType special_material = material_type;
if (drawtype == NDT_PLANTLIKE_ROOTED) {
if (waving == 1)
special_material = TILE_MATERIAL_WAVING_PLANTS;