[Bf-committers] Stucci Patch

Chris Burt desoto at blender.spaceisbig.com
Fri Feb 25 02:36:40 CET 2005


Mr. Ton!

Stucci display in the preview window is broken since you did your big 
recode. As you can see from the patch I think you forgot to move this 
one piece from previewrender.c to texture.c:

if(tex->type==TEX_STUCCI) {
	*tin= 0.5 + 0.7*texr.nor[0];
	CLAMP(*tin, 0.0, 1.0);
}

In its place was a simple:

	*tin= texr.nor[0];

The preview render, as a result, had bizarre intensity values to render 
with and did not look correct at all.

One other detail I wanted to ask about.. Do you think it would be wise 
to create a #define for the return values of textures? Right now you 
have them numerically hard coded as 0 for int, 1 for col, 2 for nor, and 
3 for everything. Would it be wise to create in texture.h:

#define RV_INT 0
#define RV_COL 1
#define RV_NOR 2
#define RV_ALL 3

So that texture functions will have structures more like:

int rv = RV_COL;

return rv;

I think this would be a lot more meaningful to future coders. Its just a 
thought. Anyone who has tips or suggestions on why this would be a poor 
approach, or a good one for that matter, please share your thoughts. I'd 
like to learn what the pros and cons are. I've also noticed that the 
emboss effect around the previews seems to have degraded in quality 
since 2.36. You've done a couple commits in this area (one big one from 
zr?) and I'm wondering if you noticed any change in the appearance of 
the border effect. Thanks Ton! (and everyone else)

Regards,
--Chris

-------------- next part --------------
A non-text attachment was scrubbed...
Name: stucci_fix.patch
Type: text/x-diff
Size: 788 bytes
Desc: not available
Url : http://projects.blender.org/pipermail/bf-committers/attachments/20050224/33b2756a/stucci_fix.bin


More information about the Bf-committers mailing list