hadronized / quaazar

Realtime 3D engine
BSD 3-Clause "New" or "Revised" License
6 stars 2 forks source link

Scale matrices cause lighting deformations #24

Closed hadronized closed 9 years ago

hadronized commented 9 years ago

Issue

When an entity gets attached a Scale different than Scale 1 1 1, lighting gets deformed.

How to reproduce

Using a Scale 10 10 10 on a plane 1x1 to make it bigger causes light diffusion to darken. The more the scale is, the more the light darkens.

Directions and leads

No–fucking–idea. Normals are correctly transformed using the transposed inverse of the model matrix.

hadronized commented 9 years ago

Leads

Just a thought… Maybe we should try to normalize the normal after the normal matrix multiplication.