diff options
author | M.G. Kishalmi <lmg@kishalmi.net> | 2011-01-30 19:24:23 +0300 |
---|---|---|
committer | M.G. Kishalmi <lmg@kishalmi.net> | 2011-01-30 19:24:23 +0300 |
commit | d5da54e1e648c264cadc77fd43d80d4ef29688f2 (patch) | |
tree | b6be3559c92bc05fda6aace64055920865ef7948 /source/blender/gpu/intern/gpu_shader_material.glsl | |
parent | 658f86b01679650f8c0ff6d3998004df2235573f (diff) |
bugfix #25867
fix for objectspace bumpmapping
Diffstat (limited to 'source/blender/gpu/intern/gpu_shader_material.glsl')
-rw-r--r-- | source/blender/gpu/intern/gpu_shader_material.glsl | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/source/blender/gpu/intern/gpu_shader_material.glsl b/source/blender/gpu/intern/gpu_shader_material.glsl index 55e182c91ae..7d7c0a69ad9 100644 --- a/source/blender/gpu/intern/gpu_shader_material.glsl +++ b/source/blender/gpu/intern/gpu_shader_material.glsl @@ -1185,24 +1185,13 @@ void mtex_bump_tap5( vec3 texco, sampler2D ima, float hScale, dBt = hScale * (Hu - Hd); } -void mtex_bump_apply_viewspace( float fDet, float dBs, float dBt, vec3 vR1, vec3 vR2, vec3 vN, +void mtex_bump_apply( float fDet, float dBs, float dBt, vec3 vR1, vec3 vR2, vec3 vN, out vec3 perturbed_norm ) { vec3 vSurfGrad = sign(fDet) * ( dBs * vR1 + dBt * vR2 ); perturbed_norm = normalize( abs(fDet) * vN - vSurfGrad ); } -void mtex_bump_apply_objspace( float fDet, float dBs, float dBt, vec3 vR1in, vec3 vR2in, vec3 vNin, - mat4 mViewInv, mat4 mObjInv, - out vec3 perturbed_norm, out vec3 vR1, out vec3 vR2, out vec3 vN ) -{ - vec3 vSurfGrad = sign(fDet) * ( dBs * vR1in + dBt * vR2in ); - perturbed_norm = normalize( abs(fDet) * vNin - vSurfGrad ); - - vR1= vR1in; - vR2= vR2in; - vN= vNin; -} void mtex_bump_apply_texspace( float fDet, float dBs, float dBt, vec3 vR1, vec3 vR2, vec3 vN, sampler2D ima, vec3 texco, float scale, float ima_x, float ima_y, out vec3 perturbed_norm ) |