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:
authorBastien Montagne <bastien@blender.org>2020-09-16 17:36:33 +0300
committerBastien Montagne <bastien@blender.org>2020-09-16 17:39:49 +0300
commit0696eaa3e84e9394518e9bc86217291aa58dcf13 (patch)
tree230d50dfc76bdc1bb6e03b087f4f133d5abb6707
parent1a4fc6dcd67b3ad4a7490ba9db02881b3edb6263 (diff)
Fix T80684: Node shader wrapper: Tweak handling of alpha textures.
There is no ideal solution here, but we can assume by default that we should use the Alpha output from a texture used for transparency data. This will break people using a dedicated B&W texture for this alpha pass, but we cannot really handle all cases properly in this wrapper, we only try to support the most common ones to some extent.
-rw-r--r--release/scripts/modules/bpy_extras/node_shader_utils.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/release/scripts/modules/bpy_extras/node_shader_utils.py b/release/scripts/modules/bpy_extras/node_shader_utils.py
index ce5edde5adf..81c7fa31379 100644
--- a/release/scripts/modules/bpy_extras/node_shader_utils.py
+++ b/release/scripts/modules/bpy_extras/node_shader_utils.py
@@ -486,6 +486,7 @@ class PrincipledBSDFWrapper(ShaderWrapper):
return ShaderImageTextureWrapper(
self, self.node_principled_bsdf,
self.node_principled_bsdf.inputs["Alpha"],
+ use_alpha=True,
grid_row_diff=-1,
colorspace_name='Non-Color',
)