Coloring Triangles

Hey,
i want simply color my Triangles/Polygons depending on the angle between the normal vector and a given vector (e.g. z-Axis [lookDirection]).
I only found the a way in the tutorial to color the single vertex but no solution for a whole triangle.
I don’t want the gradient interpolation between the vertex color. I want a solid color per triangle.
Can i handle this with the colorbuffer in some way or is there a other solution?

My aim is it to to show the amout of signal reflection on a panel.
90° => High reflection => Color.Red (arrival angle=angle of reflection)
45°=> Medium reflection => Color.Green
0° => Low reflection => Color.Black

I hope someone can help me and this is enough information to describe my problem :slight_smile:

Each triangle will have to have unique vertexes in this case. You cannot share them between separate triangles because they will have different normals.

1 Like