diff --git a/Shaders/landmass.frag b/Shaders/landmass.frag index 91448690b..e92c1d1f4 100644 --- a/Shaders/landmass.frag +++ b/Shaders/landmass.frag @@ -55,12 +55,15 @@ float ray_intersect(sampler2D reliefMap, vec2 dp, vec2 ds) void main (void) { + float bump = 1.0; + if ( quality_level >= 3.5 ) { linear_search_steps = 20; } - vec2 uv, dp, ds; + + vec2 uv, dp = vec2(0, 0), ds = vec2(0, 0); vec3 N; - float d; + float d = 0; if ( bump > 0.9 && quality_level >= 2.0 ) { vec3 V = normalize(ecPosition.xyz); diff --git a/Shaders/landmass.vert b/Shaders/landmass.vert index de27c5ac3..0c717001e 100644 --- a/Shaders/landmass.vert +++ b/Shaders/landmass.vert @@ -5,7 +5,6 @@ varying vec3 VTangent; varying vec3 VBinormal; varying vec3 Normal; varying vec4 constantColor; -varying float bump; attribute vec3 tangent; attribute vec3 binormal; @@ -18,7 +17,6 @@ void main(void) VNormal = gl_NormalMatrix * gl_Normal; VTangent = gl_NormalMatrix * tangent; VBinormal = gl_NormalMatrix * binormal; - bump = 1.0; gl_FrontColor = gl_Color; constantColor = gl_FrontMaterial.emission