I have a large buffer with many vertices which are all layed out in an even grid in the XZ plane but with varying heights in the Y axis. To join up these vertices the index buffer is written in a way that most of these vertices will be included in 6 different triangles. The only way I can think of giving these vertices normal attributes is by having the vertices being repeated six times in the vertex buffer or calculating the normals in a geometry shader.
Neither of these options are very desirable since the vertex buffer may be very large and a geometry shader will probably decrease rendering performance quite heavily.
Is there some way to have vertex attributes update per primitive rather than per vertex or per instance? If not is there another less expensive way I could achieve this?
I am quite new to OpenGl and 3D graphics rendering in general so I'm sorry if I am misunderstanding something.