diff --git a/data/shaders/diffuseenvmap.frag b/data/shaders/diffuseenvmap.frag index a22942d13..a1991b8a8 100644 --- a/data/shaders/diffuseenvmap.frag +++ b/data/shaders/diffuseenvmap.frag @@ -49,10 +49,10 @@ void main(void) vec3 sampleDirection = reflect(-eyedir, normal); sampleDirection = (InverseViewMatrix * vec4(sampleDirection, 0.)).xyz; - float specval = texture(ntex, uv).z; + float specval = pow(texture(ntex, uv).z, 2.); // From http://graphics.cs.williams.edu/papers/EnvMipReport2013/ int texSize = textureSize(tex, 0).x; - float lodval = clamp(log2(texSize * sqrt(3)) - .5 * log2(specval + 1), 0., 10.); + float lodval = clamp(log2(texSize * sqrt(3.)) - .5 * log2(specval + 1.), 0., 10.); vec4 specular = textureLod(tex, sampleDirection, lodval); Spec = max(specular, vec4(0.)); } diff --git a/data/stk_config.xml b/data/stk_config.xml index ca65d85c0..297520f83 100644 --- a/data/stk_config.xml +++ b/data/stk_config.xml @@ -155,8 +155,15 @@ otherwise obstricts too much of the view. --> - - + +