Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2011-11-16 19:47:25 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2011-11-16 19:47:25 +0400
commitc6bbe25c291b7729637871f6ddc1f4415b107763 (patch)
tree252e159b99abe4fff9aacb96ba17639dc269e7d1
parent004cb6ba1b96e3a4857f08255f2be9fe873b69fb (diff)
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.
-rw-r--r--source/blender/render/intern/source/render_texture.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/source/blender/render/intern/source/render_texture.c b/source/blender/render/intern/source/render_texture.c
index bd323a5b2d3..323f04cbd04 100644
--- a/source/blender/render/intern/source/render_texture.c
+++ b/source/blender/render/intern/source/render_texture.c
@@ -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 ok= 1;
-
- if(ok) {
- texture_rgb_blend(zen, tcol, zen, texres.tin, mtex->colfac, mtex->blendtype);
+ else {
+ if(mtex->mapto & WOMAP_ZENUP) zenfac= mtex->zenupfac;
+ else if(mtex->mapto & WOMAP_ZENDOWN) zenfac= mtex->zendownfac;
}
+
+ if(zenfac != 0.0f)
+ texture_rgb_blend(zen, tcol, zen, texres.tin, zenfac, mtex->blendtype);
}
}
if(mtex->mapto & WOMAP_BLEND) {