Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorMichael Fox <mfoxdogg@gmail.com>2011-02-09 04:21:03 +0300
committerMichael Fox <mfoxdogg@gmail.com>2011-02-09 04:21:03 +0300
commit2a67a126e87e87f1aaf7bfa3cc2523f014dc1d77 (patch)
tree07b94027411cdf6972efc5a2f83ea81c9baf913c /source
parentf56d1a5e2c41b722f096113267889ebb4ce25a2a (diff)
Fix for rendering procedual bump maps, mapped in world space, since the new bump map kernel uses direction, this bug became a real issue, with bumps suddenly changing direction
Fix provided due to a long session on IRC with Morten S. Mikkelsen (sparky_)
Diffstat (limited to 'source')
-rw-r--r--source/blender/render/intern/source/shadeinput.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/source/blender/render/intern/source/shadeinput.c b/source/blender/render/intern/source/shadeinput.c
index 8bf2a24cab2..88dc13d38d1 100644
--- a/source/blender/render/intern/source/shadeinput.c
+++ b/source/blender/render/intern/source/shadeinput.c
@@ -430,10 +430,10 @@ void shade_input_set_strand_texco(ShadeInput *shi, StrandRen *strand, StrandVert
mul_m4_v3(R.viewinv, shi->gl);
if(shi->osatex) {
- VECCOPY(shi->dxgl, shi->dxco);
- mul_m3_v3(R.imat, shi->dxco);
- VECCOPY(shi->dygl, shi->dyco);
- mul_m3_v3(R.imat, shi->dyco);
+ VECCOPY(shi->dxgl, shi->dxco);
+ mul_mat3_m4_v3(R.viewinv, shi->dxgl);
+ VECCOPY(shi->dygl, shi->dyco);
+ mul_mat3_m4_v3(R.viewinv, shi->dygl);
}
}
@@ -1012,13 +1012,10 @@ void shade_input_set_shade_texco(ShadeInput *shi)
VECCOPY(shi->gl, shi->co);
mul_m4_v3(R.viewinv, shi->gl);
if(shi->osatex) {
- VECCOPY(shi->dxgl, shi->dxco);
- // TXF: bug was here, but probably should be in convertblender.c, R.imat only valid if there is a world
- //mul_m3_v3(R.imat, shi->dxco);
- mul_mat3_m4_v3(R.viewinv, shi->dxco);
- VECCOPY(shi->dygl, shi->dyco);
- //mul_m3_v3(R.imat, shi->dyco);
- mul_mat3_m4_v3(R.viewinv, shi->dyco);
+ VECCOPY(shi->dxgl, shi->dxco);
+ mul_mat3_m4_v3(R.viewinv, shi->dxgl);
+ VECCOPY(shi->dygl, shi->dyco);
+ mul_mat3_m4_v3(R.viewinv, shi->dygl);
}
}