I noticed that normals are not transformed correctly when scaled non-uniformly:
|
v_WorldNormal = mat3(Model) * Vertex_Normal; |
https://www.scratchapixel.com/lessons/mathematics-physics-for-computer-graphics/geometry/transforming-normals
Example (a sphere stretched along one axis) with incorrect normals:

Corrected normals:

I used this as a quick fix, but computing the inverse in the shader isn't a great idea:
HackerFoo@a711633
The proper fix would pass the precomputed transposed inverse into the shader.
I noticed that normals are not transformed correctly when scaled non-uniformly:
bevy/crates/bevy_pbr/src/render_graph/pbr_pipeline/pbr.vert
Line 30 in f4776f2
https://www.scratchapixel.com/lessons/mathematics-physics-for-computer-graphics/geometry/transforming-normals
Example (a sphere stretched along one axis) with incorrect normals:

Corrected normals:

I used this as a quick fix, but computing the inverse in the shader isn't a great idea:
HackerFoo@a711633
The proper fix would pass the precomputed transposed inverse into the shader.