flat shading in webGL
I'm trying to implement flat-shading in webgl, I knew that varying keyword in vertex shader will interpolation that value and pass it to fragment shader. I'm trying to disable interpolation, and I found that flat keyword can do this, but it seems cannot use in webgl? flat varying vec4 fragColor; always getting error: Illegal use of reserved word 'flat' BrunoLevy I think 'flat' is not supported by the version of GLSL used in WebGL. If you want flat shading, there are several options: 1) replicate the polygon's normal in each vertex. It is the simplest solution, but I find it a bit