summaryrefslogtreecommitdiff
path: root/client/shaders/object_shader/opengl_fragment.glsl
diff options
context:
space:
mode:
authorhecks <42101236+hecktest@users.noreply.github.com>2020-09-14 19:27:25 +0200
committerGitHub <noreply@github.com>2020-09-14 19:27:25 +0200
commitfcff9f291103411af6d8f946fbb275b6fa0583b9 (patch)
tree60e33f8decb59a4a04265a2563b5bf56a5c1aad5 /client/shaders/object_shader/opengl_fragment.glsl
parent3fb1f45301880a3aa901b752af1ecc912efe5915 (diff)
downloadminetest-fcff9f291103411af6d8f946fbb275b6fa0583b9.tar.gz
minetest-fcff9f291103411af6d8f946fbb275b6fa0583b9.tar.bz2
minetest-fcff9f291103411af6d8f946fbb275b6fa0583b9.zip
Remove "generate normal maps" feature (#10313)
Erase all traces of normal "generation" from fragment shaders Remove the "feature" from the engine and default config Remove any leftover documentation of it
Diffstat (limited to 'client/shaders/object_shader/opengl_fragment.glsl')
-rw-r--r--client/shaders/object_shader/opengl_fragment.glsl31
1 files changed, 0 insertions, 31 deletions
diff --git a/client/shaders/object_shader/opengl_fragment.glsl b/client/shaders/object_shader/opengl_fragment.glsl
index 2d33ca439..a8a43e1e2 100644
--- a/client/shaders/object_shader/opengl_fragment.glsl
+++ b/client/shaders/object_shader/opengl_fragment.glsl
@@ -74,20 +74,6 @@ void get_texture_flags()
}
}
-float intensity(vec3 color)
-{
- return (color.r + color.g + color.b) / 3.0;
-}
-
-float get_rgb_height(vec2 uv)
-{
- if (texSeamless) {
- return intensity(texture2D(baseTexture, uv).rgb);
- } else {
- return intensity(texture2D(baseTexture, clamp(uv, 0.0, 0.999)).rgb);
- }
-}
-
vec4 get_normal_map(vec2 uv)
{
vec4 bump = texture2D(normalTexture, uv).rgba;
@@ -110,23 +96,6 @@ void main(void)
}
#endif
-#if GENERATE_NORMALMAPS == 1
- if (normalTexturePresent == false) {
- float tl = get_rgb_height(vec2(uv.x - SAMPLE_STEP, uv.y + SAMPLE_STEP));
- float t = get_rgb_height(vec2(uv.x - SAMPLE_STEP, uv.y - SAMPLE_STEP));
- float tr = get_rgb_height(vec2(uv.x + SAMPLE_STEP, uv.y + SAMPLE_STEP));
- float r = get_rgb_height(vec2(uv.x + SAMPLE_STEP, uv.y));
- float br = get_rgb_height(vec2(uv.x + SAMPLE_STEP, uv.y - SAMPLE_STEP));
- float b = get_rgb_height(vec2(uv.x, uv.y - SAMPLE_STEP));
- float bl = get_rgb_height(vec2(uv.x -SAMPLE_STEP, uv.y - SAMPLE_STEP));
- float l = get_rgb_height(vec2(uv.x - SAMPLE_STEP, uv.y));
- float dX = (tr + 2.0 * r + br) - (tl + 2.0 * l + bl);
- float dY = (bl + 2.0 * b + br) - (tl + 2.0 * t + tr);
- bump = vec4(normalize(vec3 (dX, dY, NORMALMAPS_STRENGTH)), 1.0);
- use_normalmap = true;
- }
-#endif
-
vec4 base = texture2D(baseTexture, uv).rgba;
#ifdef USE_DISCARD