Preview render of stucci was wrong. Fix found+provided by Chris Burt. thnx!
authorTon Roosendaal <ton@blender.org>
Fri, 25 Feb 2005 12:19:42 +0000 (12:19 +0000)
committerTon Roosendaal <ton@blender.org>
Fri, 25 Feb 2005 12:19:42 +0000 (12:19 +0000)
source/blender/render/intern/source/texture.c

index b4be9baaf826a0fd3f3c72f1489ea7ed5b14eb83..97b64d0141a3e960b2cdc784ee17c72498e98ca8 100644 (file)
@@ -1190,7 +1190,10 @@ int multitex_ext(Tex *tex, float *texvec, float *tin, float *tr, float *tg, floa
        else texr.nor= NULL;
        
        retval= multitex(tex, texvec, NULL, NULL, 0, &texr);
-       if(tex->type==TEX_STUCCI) *tin= texr.nor[0];
+       if(tex->type==TEX_STUCCI) {
+               *tin= 0.5 + 0.7*texr.nor[0];
+               CLAMP(*tin, 0.0, 1.0);
+       }
        else *tin= texr.tin;
        *tr= texr.tr;
        *tg= texr.tg;