[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [34729] trunk/blender/source/blender/ render/intern/source/shadeinput.c: 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
Michael Fox
mfoxdogg at gmail.com
Wed Feb 9 02:21:05 CET 2011
Revision: 34729
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=34729
Author: mfoxdogg
Date: 2011-02-09 01:21:03 +0000 (Wed, 09 Feb 2011)
Log Message:
-----------
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_)
Modified Paths:
--------------
trunk/blender/source/blender/render/intern/source/shadeinput.c
Modified: trunk/blender/source/blender/render/intern/source/shadeinput.c
===================================================================
--- trunk/blender/source/blender/render/intern/source/shadeinput.c 2011-02-09 01:16:11 UTC (rev 34728)
+++ trunk/blender/source/blender/render/intern/source/shadeinput.c 2011-02-09 01:21:03 UTC (rev 34729)
@@ -430,10 +430,10 @@
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 @@
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);
}
}
More information about the Bf-blender-cvs
mailing list