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:
authorSergey Sharybin <sergey.vfx@gmail.com>2013-02-07 19:36:59 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2013-02-07 19:36:59 +0400
commit7cb62127b36d82182642043c57ced97d7f804a69 (patch)
tree7ca43c76903364a8c00ac7675750b2c95b9da99b /source/blender/render
parent3a31e1ef27d48ed2841ae863754bf17d954ece35 (diff)
Fix #34156: Spec. and Alpha Intensity OpenGL issue
Issue was caused by alpha pipeline cleanup: apparently depending on use_alpha flag different channels for spec/alpha would be used. Made it so talpha is computed from Image->ignore_alpha instead of always considering to be TRUTH. This is not so much trivial to understand what's going on here, but it's not new issue. Anyway, if someone have got ideas how to improve feedback here -- ideas are welcome! For now only regression is fixed.
Diffstat (limited to 'source/blender/render')
-rw-r--r--source/blender/render/intern/source/imagetexture.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/source/blender/render/intern/source/imagetexture.c b/source/blender/render/intern/source/imagetexture.c
index 0a427d57ebc..55dadc14989 100644
--- a/source/blender/render/intern/source/imagetexture.c
+++ b/source/blender/render/intern/source/imagetexture.c
@@ -224,8 +224,10 @@ int imagewrap(Tex *tex, Image *ima, ImBuf *ibuf, const float texvec[3], TexResul
}
/* keep this before interpolation [#29761] */
- if ((tex->imaflag & TEX_CALCALPHA) == 0) {
- texres->talpha = TRUE;
+ if (tex->ima && (tex->ima->flag & IMA_IGNORE_ALPHA) == 0) {
+ if ((tex->imaflag & TEX_CALCALPHA) == 0) {
+ texres->talpha = TRUE;
+ }
}
/* interpolate */
@@ -1092,8 +1094,10 @@ static int imagewraposa_aniso(Tex *tex, Image *ima, ImBuf *ibuf, const float tex
/* mipmap test */
image_mipmap_test(tex, ibuf);
- if ((tex->imaflag & TEX_CALCALPHA) == 0)
- texres->talpha = 1;
+ if (tex->ima && (tex->ima->flag & IMA_IGNORE_ALPHA) == 0) {
+ if ((tex->imaflag & TEX_CALCALPHA) == 0)
+ texres->talpha = 1;
+ }
texr.talpha = texres->talpha;
if (tex->imaflag & TEX_IMAROT) {
@@ -1506,8 +1510,10 @@ int imagewraposa(Tex *tex, Image *ima, ImBuf *ibuf, const float texvec[3], const
/* mipmap test */
image_mipmap_test(tex, ibuf);
- if ((tex->imaflag & TEX_CALCALPHA) == 0) {
- texres->talpha = TRUE;
+ if (tex->ima && (tex->ima->flag & IMA_IGNORE_ALPHA) == 0) {
+ if ((tex->imaflag & TEX_CALCALPHA) == 0) {
+ texres->talpha = TRUE;
+ }
}
texr.talpha= texres->talpha;