forked from bartvdbraak/blender
Fix #29093: world zenith up and down texture influence were not working
correct. These were decoupled from horizon influence for 2.5, but not actually used in the render engine.
This commit is contained in:
parent
004cb6ba1b
commit
c6bbe25c29
@ -3007,7 +3007,7 @@ void do_sky_tex(const float rco[3], float lo[3], const float dxyview[2], float h
|
||||
TexResult texres= {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, NULL};
|
||||
float *co, fact, stencilTin=1.0;
|
||||
float tempvec[3], texvec[3], dxt[3], dyt[3];
|
||||
int tex_nr, rgb= 0, ok;
|
||||
int tex_nr, rgb= 0;
|
||||
|
||||
if (R.r.scemode & R_NO_TEX) return;
|
||||
/* todo: add flag to test if there's a tex */
|
||||
@ -3171,18 +3171,21 @@ void do_sky_tex(const float rco[3], float lo[3], const float dxyview[2], float h
|
||||
texture_rgb_blend(hor, tcol, hor, texres.tin, mtex->colfac, mtex->blendtype);
|
||||
}
|
||||
if(mtex->mapto & (WOMAP_ZENUP+WOMAP_ZENDOWN)) {
|
||||
ok= 0;
|
||||
float zenfac = 0.0f;
|
||||
|
||||
if(R.wrld.skytype & WO_SKYREAL) {
|
||||
if((skyflag & WO_ZENUP)) {
|
||||
if(mtex->mapto & WOMAP_ZENUP) ok= 1;
|
||||
if(mtex->mapto & WOMAP_ZENUP) zenfac= mtex->zenupfac;
|
||||
}
|
||||
else if(mtex->mapto & WOMAP_ZENDOWN) ok= 1;
|
||||
else if(mtex->mapto & WOMAP_ZENDOWN) zenfac= mtex->zendownfac;
|
||||
}
|
||||
else {
|
||||
if(mtex->mapto & WOMAP_ZENUP) zenfac= mtex->zenupfac;
|
||||
else if(mtex->mapto & WOMAP_ZENDOWN) zenfac= mtex->zendownfac;
|
||||
}
|
||||
else ok= 1;
|
||||
|
||||
if(ok) {
|
||||
texture_rgb_blend(zen, tcol, zen, texres.tin, mtex->colfac, mtex->blendtype);
|
||||
}
|
||||
if(zenfac != 0.0f)
|
||||
texture_rgb_blend(zen, tcol, zen, texres.tin, zenfac, mtex->blendtype);
|
||||
}
|
||||
}
|
||||
if(mtex->mapto & WOMAP_BLEND) {
|
||||
|
Loading…
Reference in New Issue
Block a user