Use TBN in apply_normal_mapping in pbr_prepass (#13716)

# Objective

- apply_normal_mapping was changed to use TBN but the pbr_prepass was
not updated for that change

## Solution

- Update the pbr_prepass to correctly apply normal mapping
This commit is contained in:
IceSentry 2024-06-06 15:04:30 -04:00 committed by GitHub
parent 175e146228
commit f7ae277025
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -74,13 +74,13 @@ fn fragment(
uv, uv,
bias, bias,
).rgb; ).rgb;
let TBN = pbr_functions::calculate_tbn_mikktspace(normal, in.world_tangent);
normal = pbr_functions::apply_normal_mapping( normal = pbr_functions::apply_normal_mapping(
material.flags, material.flags,
world_normal, TBN,
double_sided, double_sided,
is_front, is_front,
in.world_tangent,
Nt, Nt,
view.mip_bias, view.mip_bias,
); );