diff options
author | Philipp Oeser <info@graphics-engineer.com> | 2020-06-04 19:01:05 +0300 |
---|---|---|
committer | Philipp Oeser <info@graphics-engineer.com> | 2020-06-10 12:07:20 +0300 |
commit | 82f51fe9132f50d10f1263e97ecde9655af97671 (patch) | |
tree | 9a6160b2254d51c41e6c23e8da47ec787cc1b799 /source/blender/editors/render | |
parent | df50104e1c75e73d93113f71b9c1226738a35169 (diff) |
Fix T77356: Texture Preview not taking alpha into account
Since rB329b4c3363e4 a texture preview is not rendered through the
preview.blend and a renderengine anymore [unlike materials etc.]
Alpha wasnt handled in that commit, take that into account now.
sidenote: not sure if we should be looking into drawing alpha with a
checkerboard in the background for texture previews (see texture
previews elsewhere)?
sidenote 2: might also be good to document where the "calculate" and
"invert" alpha options are still used? [looks a bit inconsistent:
compositor uses it, Image Editor as well as Render Engines dont?]
Maniphest Tasks: T77356
Differential Revision: https://developer.blender.org/D7929
Diffstat (limited to 'source/blender/editors/render')
-rw-r--r-- | source/blender/editors/render/render_preview.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/render/render_preview.c b/source/blender/editors/render/render_preview.c index 0432057bb47..19e4f652963 100644 --- a/source/blender/editors/render/render_preview.c +++ b/source/blender/editors/render/render_preview.c @@ -801,7 +801,7 @@ static void shader_preview_texture(ShaderPreview *sp, Tex *tex, Scene *sce, Rend rect_float[0] = texres.tr; rect_float[1] = texres.tg; rect_float[2] = texres.tb; - rect_float[3] = 1.0f; + rect_float[3] = texres.talpha ? texres.ta : 1.0f; rect_float += 4; } |