RenderMesh: Make opacity affect mesh when not using background too

This commit is contained in:
kijai 2026-07-26 14:09:23 +03:00
parent dd5f2bc58c
commit e659df2be6
2 changed files with 6 additions and 1 deletions

View File

@ -669,7 +669,10 @@ def _render_mesh_mode_inputs():
"'depth' = linear gray."
),
),
io.Float.Input("opacity", default=1.0, min=0.0, max=1.0, step=0.01),
io.Float.Input(
"opacity", default=1.0, min=0.0, max=1.0, step=0.01,
tooltip="Mesh alpha over the background image, or over black when none is connected.",
),
io.Float.Input(
"person_palette_falloff",
default=0.6, min=0.1, max=1.0, step=0.05,

View File

@ -463,5 +463,7 @@ def render_pose_data_torch(
if opacity != 1.0:
a = a * float(opacity)
rendered = torch.lerp(bg, rendered, a)
elif opacity != 1.0:
rendered = rendered * float(opacity)
return rendered