Sh*t! I started to add a normal vector to my Vertex data structure, so I can easily implement a basic diffuse lighting to my game.
Then I realized my vertices are used for multiple triangles, since I use the "indices" feature.
😢

Follow

Fortunately, I can write a geometry shader in which I can compute the normal for the current triangle :-)

· · Web · 0 · 0 · 0
Sign in to participate in the conversation
La Quadrature du Net - Mastodon - Media Fédéré

Mamot.fr est un serveur Mastodon francophone, géré par La Quadrature du Net.