aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorparamat <mat.gregory@virginmedia.com>2017-05-05 02:12:47 +0100
committerparamat <mat.gregory@virginmedia.com>2017-05-08 05:58:59 +0100
commit3342dcc4bc6ee573ab0ce7ecff966faf60e09d56 (patch)
treed5453355dcd7b57e60e80d339bbc36991be8e88e /src
parentc1b3ed4180dea16e2fa77663a7d2bf155595dd60 (diff)
downloadminetest-3342dcc4bc6ee573ab0ce7ecff966faf60e09d56.tar.gz
minetest-3342dcc4bc6ee573ab0ce7ecff966faf60e09d56.tar.bz2
minetest-3342dcc4bc6ee573ab0ce7ecff966faf60e09d56.zip
Shaders: Remove unused water surface shader
Also remove hardcoded MTGame node. The 'water surface shader' was duplicated shader code in preparation for intended new water surface shaders. For development purposes the MTGame node 'default:water_source' had it's top tile assigned to 'water surface shader'. Due to shader duplication this commit does not cause any change to shader behaviour.
Diffstat (limited to 'src')
-rw-r--r--src/nodedef.cpp11
1 files changed, 1 insertions, 10 deletions
diff --git a/src/nodedef.cpp b/src/nodedef.cpp
index 1bc483077..966275076 100644
--- a/src/nodedef.cpp
+++ b/src/nodedef.cpp
@@ -670,7 +670,6 @@ void ContentFeatures::updateTextures(ITextureSource *tsrc, IShaderSource *shdsrc
}
bool is_liquid = false;
- bool is_water_surface = false;
u8 material_type = (alpha == 255) ?
TILE_MATERIAL_BASIC : TILE_MATERIAL_ALPHA;
@@ -760,12 +759,9 @@ void ContentFeatures::updateTextures(ITextureSource *tsrc, IShaderSource *shdsrc
break;
}
- if (is_liquid) {
+ if (is_liquid)
material_type = (alpha == 255) ?
TILE_MATERIAL_LIQUID_OPAQUE : TILE_MATERIAL_LIQUID_TRANSPARENT;
- if (name == "default:water_source")
- is_water_surface = true;
- }
// Vertex alpha is no longer supported, correct if necessary.
correctAlpha();
@@ -776,11 +772,6 @@ void ContentFeatures::updateTextures(ITextureSource *tsrc, IShaderSource *shdsrc
material_type, drawtype);
}
- if (is_water_surface) {
- tile_shader[0] = shdsrc->getShader("water_surface_shader",
- material_type, drawtype);
- }
-
// Tiles (fill in f->tiles[])
for (u16 j = 0; j < 6; j++) {
fillTileAttribs(tsrc, &tiles[j].layers[0], &tdef[j], tile_shader[j],