Is gl_Normal averaged vector?

For shading, normal vector per vertex should be averaged by normals of triangles sharing the vertex. In applying shading, i’m confused with whether gl_Normal representing built-in attribute normal vector per vertex is averaged vector.
Should i average normal vector by myself?

In fact normals are specified per vertex, like all vertex attributes.

That means that in the vertex shader, the normal must have already been calculated by you.

In the fragment shader, the normal is a linear interpolation between the 3 adjacent vertices, so for best results it should be renormalized within the shader.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.