diff options
-rw-r--r-- | source/blender/blenkernel/intern/world.c | 8 | ||||
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 1 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_world_types.h | 6 | ||||
-rw-r--r-- | source/blender/render/intern/source/rendercore.c | 2 | ||||
-rw-r--r-- | source/blender/src/buttons_shading.c | 2 |
5 files changed, 9 insertions, 10 deletions
diff --git a/source/blender/blenkernel/intern/world.c b/source/blender/blenkernel/intern/world.c index ea4f9bd790b..a5872c0abe9 100644 --- a/source/blender/blenkernel/intern/world.c +++ b/source/blender/blenkernel/intern/world.c @@ -90,8 +90,8 @@ World *add_world(char *name) wrld->starsize= 2.0f; wrld->gravity= 9.8f; - wrld->exposure= 0.0f; - wrld->range= 1.0f; + wrld->exp= 0.0f; + wrld->exposure=wrld->range= 1.0f; return wrld; } @@ -201,10 +201,10 @@ void init_render_world() } else { memset(&R.wrld, 0, sizeof(World)); - R.wrld.exposure= 0.0; + R.wrld.exp= 0.0; R.wrld.range= 1.0; } - R.wrld.linfac= 1.0 + pow((2.0*R.wrld.exposure + 0.5), -10); + R.wrld.linfac= 1.0 + pow((2.0*R.wrld.exp + 0.5), -10); R.wrld.logfac= log( (R.wrld.linfac-1.0)/R.wrld.linfac )/R.wrld.range; } diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index e44aae82ae2..701d621bafc 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -3972,7 +3972,6 @@ static void do_versions(Main *main) while(wrld) { if(wrld->range==0.0) { wrld->range= 1.0/wrld->exposure; - wrld->exposure= 0.0; } wrld= wrld->id.next; } diff --git a/source/blender/makesdna/DNA_world_types.h b/source/blender/makesdna/DNA_world_types.h index a610d35007a..47ac0d337c3 100644 --- a/source/blender/makesdna/DNA_world_types.h +++ b/source/blender/makesdna/DNA_world_types.h @@ -58,10 +58,11 @@ typedef struct World { unsigned int fastcol; /** - * New exposure/range control. linfac & logfac are constants... don't belong in + * Exposure= mult factor. unused now, but maybe back later. Kept in to be upward compat. + * New is exp/range control. linfac & logfac are constants... don't belong in * file, but allocating 8 bytes for temp mem isnt useful either. */ - float exposure, range; + float exposure, exp, range; float linfac, logfac; /** @@ -93,7 +94,6 @@ typedef struct World { short dofsta, dofend, dofmin, dofmax; int physicsEngine; - int pad; struct Ipo *ipo; struct MTex *mtex[8]; diff --git a/source/blender/render/intern/source/rendercore.c b/source/blender/render/intern/source/rendercore.c index 9406fec1abb..8094406e1e3 100644 --- a/source/blender/render/intern/source/rendercore.c +++ b/source/blender/render/intern/source/rendercore.c @@ -2464,7 +2464,7 @@ temp_y= floor(y); VecAddf(col, shr.diff, shr.spec); /* exposure correction */ - if(R.wrld.exposure!=0.0 || R.wrld.range!=1.0) { + if(R.wrld.exp!=0.0 || R.wrld.range!=1.0) { if((shi.matren->mode & MA_SHLESS)==0) { col[0]= R.wrld.linfac*(1.0-exp( col[0]*R.wrld.logfac) ); col[1]= R.wrld.linfac*(1.0-exp( col[1]*R.wrld.logfac) ); diff --git a/source/blender/src/buttons_shading.c b/source/blender/src/buttons_shading.c index 4aefdf8f134..63742b686c6 100644 --- a/source/blender/src/buttons_shading.c +++ b/source/blender/src/buttons_shading.c @@ -1606,7 +1606,7 @@ static void world_panel_world(World *wrld) uiBlockBeginAlign(block); uiBlockSetCol(block, TH_BUT_SETTING1); - uiDefButF(block, NUMSLI,0, "Exp ", 160,30,145,19, &(wrld->exposure), 0.0, 1.0, 0, 2, "Sets amount of exponential color correction for light"); + uiDefButF(block, NUMSLI,0, "Exp ", 160,30,145,19, &(wrld->exp), 0.0, 1.0, 0, 2, "Sets amount of exponential color correction for light"); uiDefButF(block, NUMSLI,0, "Range ", 160,10,145,19, &(wrld->range), 0.2, 5.0, 0, 2, "Sets the color amount that will be mapped on color 1.0"); |