Render feature: the END OF DIFFUSE BANDING!
http://www.blender.org/development/current-projects/changes-since-244/rendering-features/ Thanks Andy for poking and analysing, and Nathan for feedback!
This commit is contained in:
@@ -79,7 +79,7 @@ typedef struct Material {
|
||||
float aniso_gloss_mir;
|
||||
float dist_mir;
|
||||
short fadeto_mir;
|
||||
short pad1;
|
||||
short shade_flag; /* like Cubic interpolation */
|
||||
|
||||
int mode, mode_l; /* mode_l is the or-ed result of all layer modes */
|
||||
short flarec, starc, linec, ringc;
|
||||
@@ -201,6 +201,9 @@ typedef struct Material {
|
||||
#define MA_RAYMIR_FADETOSKY 0
|
||||
#define MA_RAYMIR_FADETOMAT 1
|
||||
|
||||
/* shade_flag */
|
||||
#define MA_CUBIC 1
|
||||
|
||||
/* diff_shader */
|
||||
#define MA_DIFF_LAMBERT 0
|
||||
#define MA_DIFF_ORENNAYAR 1
|
||||
|
||||
@@ -1297,7 +1297,10 @@ static void shade_one_light(LampRen *lar, ShadeInput *shi, ShadeResult *shr, int
|
||||
else is= inp; // Lambert
|
||||
}
|
||||
|
||||
/* i is diffuse */
|
||||
/* 'is' is diffuse */
|
||||
if((ma->shade_flag & MA_CUBIC) && is>0.0f)
|
||||
is= 3.0*is*is - 2.0*is*is*is; // nicer termination of shades
|
||||
|
||||
i= is*phongcorr;
|
||||
|
||||
if(i>0.0f) {
|
||||
|
||||
@@ -3791,7 +3791,8 @@ static void material_panel_shading(Material *ma)
|
||||
uiDefButBitI(block, TOG, MA_SHADOW, B_MATPRV, "Shadow", 245,140,65,19, &(ma->mode), 0, 0, 0, 0, "Makes material receive shadows");
|
||||
uiDefButBitI(block, TOG, MA_SHADOW_TRA, B_MATPRV, "TraShadow", 245,120,65,19, &(ma->mode), 0, 0, 0, 0, "Receives transparent shadows based at material color and alpha");
|
||||
uiDefButBitI(block, TOG, MA_ONLYSHADOW, B_MATPRV, "OnlyShad", 245,100,65,20, &(ma->mode), 0, 0, 0, 0, "Renders shadows on material as Alpha value");
|
||||
uiDefButBitI(block, TOG, MA_RAYBIAS, B_MATPRV, "Bias", 245,80,65,19, &(ma->mode), 0, 0, 0, 0, "Prevents ray traced shadow errors with phong interpolated normals (terminator problem)");
|
||||
uiDefButBitS(block, TOG, MA_CUBIC, B_MATPRV, "Cubic", 245,80,65,19, &(ma->shade_flag), 0, 0, 0, 0, "Use Cubic interpolation of diffuse values, for smoother transitions)");
|
||||
uiDefButBitI(block, TOG, MA_RAYBIAS, B_MATPRV, "Bias", 245,60,65,19, &(ma->mode), 0, 0, 0, 0, "Prevents ray traced shadow errors with phong interpolated normals (terminator problem)");
|
||||
|
||||
uiBlockBeginAlign(block);
|
||||
uiDefIDPoinBut(block, test_grouppoin_but, ID_GR, B_MATPRV, "GR:", 9, 55, 150, 19, &ma->group, "Limit Lighting to Lamps in this Group");
|
||||
|
||||
Reference in New Issue
Block a user