[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [34550] trunk/blender/source/blender/ render/intern/source/texture.c: ISO C90 fix

M.G. Kishalmi lmg at kishalmi.net
Sat Jan 29 13:09:11 CET 2011


Revision: 34550
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=34550
Author:   lmg
Date:     2011-01-29 12:09:11 +0000 (Sat, 29 Jan 2011)
Log Message:
-----------
ISO C90 fix

Modified Paths:
--------------
    trunk/blender/source/blender/render/intern/source/texture.c

Modified: trunk/blender/source/blender/render/intern/source/texture.c
===================================================================
--- trunk/blender/source/blender/render/intern/source/texture.c	2011-01-29 12:01:11 UTC (rev 34549)
+++ trunk/blender/source/blender/render/intern/source/texture.c	2011-01-29 12:09:11 UTC (rev 34550)
@@ -1899,10 +1899,7 @@
 	TexResult ttexr = {0, 0, 0, 0, 0, texres->talpha, NULL};	// temp TexResult
 
 	const int fromrgb = ((tex->type == TEX_IMAGE) || ((tex->flag & TEX_COLORBAND)!=0));
-	// TODO: solve this Hscale issue more elegantly.
 	float Hscale = 0.1f * Tnor*mtex->norfac; // factor 0.1 proved to look like the previous bump code
-	if( mtex->texflag & MTEX_BUMP_TEXTURESPACE )
-		Hscale *= 130.0f;
 
 	// 2 channels for 2D texture and 3 for 3D textures.
 	const int nr_channels = (mtex->texco == TEXCO_UV)? 2 : 3;
@@ -1913,6 +1910,10 @@
 	float *nvec = texres->nor;
 	texres->nor = NULL;
 
+	// TODO: solve this Hscale issue more elegantly.
+	if( mtex->texflag & MTEX_BUMP_TEXTURESPACE )
+		Hscale *= 130.0f;
+
 	if(!(mtex->texflag & MTEX_5TAP_BUMP)) {
 		// compute height derivatives with respect to output image pixel coordinates x and y
 		float STll[3], STlr[3], STul[3];




More information about the Bf-blender-cvs mailing list