[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [34674] trunk/blender/source/blender/ render/intern/source/render_texture.c: Bugfix #25953
Ton Roosendaal
ton at blender.org
Sun Feb 6 19:38:54 CET 2011
Revision: 34674
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=34674
Author: ton
Date: 2011-02-06 18:38:53 +0000 (Sun, 06 Feb 2011)
Log Message:
-----------
Bugfix #25953
Fix in crashing displacement last friday, assumed wrongly that
the old 'new bump' failed for displacement too. It still did
work (somewhat). This restores the situation again.
Modified Paths:
--------------
trunk/blender/source/blender/render/intern/source/render_texture.c
Modified: trunk/blender/source/blender/render/intern/source/render_texture.c
===================================================================
--- trunk/blender/source/blender/render/intern/source/render_texture.c 2011-02-06 18:05:05 UTC (rev 34673)
+++ trunk/blender/source/blender/render/intern/source/render_texture.c 2011-02-06 18:38:53 UTC (rev 34674)
@@ -2080,6 +2080,8 @@
void do_material_tex(ShadeInput *shi)
{
+ CompatibleBump compat_bump;
+ NTapBump ntap_bump;
MTex *mtex;
Tex *tex;
TexResult texres= {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, NULL};
@@ -2087,9 +2089,6 @@
float fact, facm, factt, facmm, stencilTin=1.0;
float texvec[3], dxt[3], dyt[3], tempvec[3], norvec[3], warpvec[3]={0.0f, 0.0f, 0.0f}, Tnor=1.0;
int tex_nr, rgbnor= 0, warpdone=0;
-
- CompatibleBump compat_bump;
- NTapBump ntap_bump;
int use_compat_bump, use_ntap_bump;
compatible_bump_init(&compat_bump);
@@ -2113,11 +2112,16 @@
use_ntap_bump= (mtex->texflag & (MTEX_3TAP_BUMP|MTEX_5TAP_BUMP));
/* XXX texture node trees don't work for this yet */
- /* it also needs derivatives */
- if((tex->nodetree && tex->use_nodes) || shi->osatex==0) {
+ if(tex->nodetree && tex->use_nodes) {
use_compat_bump = 0;
use_ntap_bump = 0;
}
+
+ /* case displacement mapping */
+ if(shi->osatex==0 && use_ntap_bump) {
+ use_ntap_bump = 0;
+ use_compat_bump = 1;
+ }
/* which coords */
if(mtex->texco==TEXCO_ORCO) {
More information about the Bf-blender-cvs
mailing list