Incorrect normal calculation in Skinning.slang cause incorrect shading result
SonyKnakamura opened this issue · comments
In version 6.0, Skinning.slang do not compute normal vectors correctly when skinned mesh is deformed. This will cause wrong shading results as below.
Incorrect shading result (the arm part obviously reveals incorrect shading results):
This problem may be due to a change in normal calculations in Source/Falcor/Scene/Animation/Skinning.slang from the v5.2 update.
s.normal = mul((float3x3) transpose(invTransposeMat), s.normal);
Correct shading result can be obtained by modifying the relevant line like this:
s.normal = mul((float3x3) invTransposeMat, s.normal);
Thanks for reporting, this slipped our tests! We confirmed the fix and it will be released soon as part of the next update.