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" #OpenGL feature.😢
Fortunately, I can write a geometry shader in which I can compute the normal for the current triangle :-)#OpenGL
Mamot.fr est un serveur Mastodon francophone, géré par La Quadrature du Net.
Fortunately, I can write a geometry shader in which I can compute the normal for the current triangle :-)
#OpenGL