mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-12 16:15:20 +02:00
Fix typo in minimap bumpmapping shader (#14280)
This commit is contained in:
@@ -12,13 +12,13 @@ void main (void)
|
|||||||
//texture sampling rate
|
//texture sampling rate
|
||||||
const float step = 1.0 / 256.0;
|
const float step = 1.0 / 256.0;
|
||||||
float tl = texture2D(normalTexture, vec2(uv.x - step, uv.y + step)).r;
|
float tl = texture2D(normalTexture, vec2(uv.x - step, uv.y + step)).r;
|
||||||
float t = texture2D(normalTexture, vec2(uv.x - step, uv.y - step)).r;
|
float t = texture2D(normalTexture, vec2(uv.x, uv.y + step)).r;
|
||||||
float tr = texture2D(normalTexture, vec2(uv.x + step, uv.y + step)).r;
|
float tr = texture2D(normalTexture, vec2(uv.x + step, uv.y + step)).r;
|
||||||
float r = texture2D(normalTexture, vec2(uv.x + step, uv.y)).r;
|
float r = texture2D(normalTexture, vec2(uv.x + step, uv.y )).r;
|
||||||
float br = texture2D(normalTexture, vec2(uv.x + step, uv.y - step)).r;
|
float br = texture2D(normalTexture, vec2(uv.x + step, uv.y - step)).r;
|
||||||
float b = texture2D(normalTexture, vec2(uv.x, uv.y - step)).r;
|
float b = texture2D(normalTexture, vec2(uv.x, uv.y - step)).r;
|
||||||
float bl = texture2D(normalTexture, vec2(uv.x - step, uv.y - step)).r;
|
float bl = texture2D(normalTexture, vec2(uv.x - step, uv.y - step)).r;
|
||||||
float l = texture2D(normalTexture, vec2(uv.x - step, uv.y)).r;
|
float l = texture2D(normalTexture, vec2(uv.x - step, uv.y )).r;
|
||||||
float dX = (tr + 2.0 * r + br) - (tl + 2.0 * l + bl);
|
float dX = (tr + 2.0 * r + br) - (tl + 2.0 * l + bl);
|
||||||
float dY = (bl + 2.0 * b + br) - (tl + 2.0 * t + tr);
|
float dY = (bl + 2.0 * b + br) - (tl + 2.0 * t + tr);
|
||||||
vec4 bump = vec4 (normalize(vec3 (dX, dY, 0.1)),1.0);
|
vec4 bump = vec4 (normalize(vec3 (dX, dY, 0.1)),1.0);
|
||||||
|
Reference in New Issue
Block a user