diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-01-03 06:26:32 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-01-03 06:26:32 +0400 |
commit | dcdcaf25ba176b826f0a39958e0d3c2b5baff42d (patch) | |
tree | aea55083e6dadbcadfe975d7b78159afd1fab167 /source/blender/render | |
parent | 8983d68fd8fbda9d0500dd60af259b87ec28b4c3 (diff) |
fix [#29761] Texture painting with interpolation ignores use alpha
reporter - Shawn Zilbert (enigmatic) included patch.
Diffstat (limited to 'source/blender/render')
-rw-r--r-- | source/blender/render/intern/source/imagetexture.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/source/blender/render/intern/source/imagetexture.c b/source/blender/render/intern/source/imagetexture.c index 785d9ac69d8..0b6e1b8ee01 100644 --- a/source/blender/render/intern/source/imagetexture.c +++ b/source/blender/render/intern/source/imagetexture.c @@ -203,6 +203,13 @@ int imagewrap(Tex *tex, Image *ima, ImBuf *ibuf, const float texvec[3], TexResul ibuf->rect+= (ibuf->x*ibuf->y); } + /* keep this before interpolation [#29761] */ + if (tex->imaflag & TEX_USEALPHA) { + if ((tex->imaflag & TEX_CALCALPHA) == 0) { + texres->talpha = TRUE; + } + } + /* interpolate */ if (tex->imaflag & TEX_INTERPOL) { float filterx, filtery; @@ -225,11 +232,6 @@ int imagewrap(Tex *tex, Image *ima, ImBuf *ibuf, const float texvec[3], TexResul ibuf->rect-= (ibuf->x*ibuf->y); } - if(tex->imaflag & TEX_USEALPHA) { - if(tex->imaflag & TEX_CALCALPHA); - else texres->talpha= 1; - } - if(texres->nor) { if(tex->imaflag & TEX_NORMALMAP) { // qdn: normal from color |