diobat / FluxLumina

FluxLumina is an openGL based rendering engine
MIT License
9 stars 0 forks source link

Vertex normals are now also multiplied by model matrix #63

Closed diobat closed 10 months ago

diobat commented 10 months ago

Despite the fact that we offered model rotation, we did not account for the normals

The result was that when models were rotated in-engine, illuminations of the surface of the models would come out wrongly because the normals of the faces would not be rotated accordingly

I added a multiplication between the imported normal values and a 3x3 matrix built from the rotation constituents of the model matrix