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:
parent
175e146228
commit
f7ae277025
@ -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,
|
||||||
);
|
);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user