![[00 Asset Bank/Pasted image 20250124093208.png|sepia]] A model for [[Shading]] a [[02 Areas/Computer Science/Triangular Mesh|Triangular Mesh]] that uses difference colors for each point on a Mesh [[Face]]. This is done by assigning a [[02 Areas/Math/Normal Vector|Normal Vector]] to each [[Vertex]], For [[Smooth Shading]] we need a [[02 Areas/Math/Normal Vector|Normal]] array to the [[02 Areas/Computer Science/Triangular Mesh|Triangular Mesh]] structure, one for each [[Vertex]]. The light intensity at any [[02 Areas/Math/Point|Point]] in the [[02 Areas/Computer Science/Fragment Shader|Fragment Shader]], is determined as proportional to the cosine of the angle between the viewing vector and the interpolated [[02 Areas/Computer Science/Triangle Orientation|Orientation]] of that vertex (similar to [[02 Areas/Computer Science/Visibility Determination|Visibility Determination]]). $\huge L = \op{max}\pa{ \vec n \cdot (E-\vec v), 0} $