diff options
author | Dave Parks <davep@lindenlab.com> | 2022-03-04 17:05:05 -0600 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2022-03-04 17:05:05 -0600 |
commit | 9dc8fee0f52b5cf9d0cfc85fd285b3829b165796 (patch) | |
tree | 07f14fdaecb4a3c29ec99a7b378e59e1eab893cc /indra/newview/app_settings | |
parent | 97a103255e433629f13e2156aa307ca329cdcfc6 (diff) |
SL-16928 Fix for broken bumpmaps on Intel GPUs
Diffstat (limited to 'indra/newview/app_settings')
-rw-r--r-- | indra/newview/app_settings/shaders/class1/deferred/normgenF.glsl | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/normgenF.glsl b/indra/newview/app_settings/shaders/class1/deferred/normgenF.glsl index d0c06cd51f..7a941674b8 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/normgenF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/normgenF.glsl @@ -43,18 +43,18 @@ uniform float norm_scale; void main() { - float alpha = texture2D(alphaMap, vary_texcoord0).a; + float c = texture2D(alphaMap, vary_texcoord0).r; - vec3 right = vec3(norm_scale, 0, (texture2D(alphaMap, vary_texcoord0+vec2(stepX, 0)).a-alpha)*255); - vec3 left = vec3(-norm_scale, 0, (texture2D(alphaMap, vary_texcoord0-vec2(stepX, 0)).a-alpha)*255); - vec3 up = vec3(0, -norm_scale, (texture2D(alphaMap, vary_texcoord0-vec2(0, stepY)).a-alpha)*255); - vec3 down = vec3(0, norm_scale, (texture2D(alphaMap, vary_texcoord0+vec2(0, stepY)).a-alpha)*255); + vec3 right = vec3(norm_scale, 0, (texture2D(alphaMap, vary_texcoord0+vec2(stepX, 0)).r-c)*255); + vec3 left = vec3(-norm_scale, 0, (texture2D(alphaMap, vary_texcoord0-vec2(stepX, 0)).r-c)*255); + vec3 up = vec3(0, -norm_scale, (texture2D(alphaMap, vary_texcoord0-vec2(0, stepY)).r-c)*255); + vec3 down = vec3(0, norm_scale, (texture2D(alphaMap, vary_texcoord0+vec2(0, stepY)).r-c)*255); vec3 norm = cross(right, down) + cross(down, left) + cross(left,up) + cross(up, right); norm = normalize(norm); norm *= 0.5; norm += 0.5; - - frag_color = vec4(norm, alpha); + + frag_color = vec4(norm, c); } |