From 23d658e87a04d173050d3798276b0ae499c07c5b Mon Sep 17 00:00:00 2001 From: Zixiong Wang Date: Sat, 3 May 2025 21:06:42 +0800 Subject: [PATCH] BUG FIX - from_tensor: Exclude normal maps from normalization --- pypbr/materials/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pypbr/materials/base.py b/pypbr/materials/base.py index f717f4f..b4f629b 100644 --- a/pypbr/materials/base.py +++ b/pypbr/materials/base.py @@ -477,7 +477,7 @@ def from_tensor( index = 0 for map_name, num_channels in config: map_split = tensor[index : index + num_channels].clone() - if is_normalized: + if is_normalized and map_name != "normal": map_split = map_split * 0.5 + 0.5 if map_name == "normal" and num_channels == 2: map_split = instance._compute_normal_map_z_component(map_split)