I would like for the color between my vertices to not be rendered as a gradient, but as a hard break. Is there any way to accomplish this in OpenGL/GLSL?
You can try doing this with
It tells GLSL to pass values from vertex to fragment without interpolation. From GLSL Interpolation qualifiers:
Additional read on SO: http://stackoverflow.com/questions/27581271/flat-qualifier-in-glsl |
||||
|
These are two options I know:
Both are often used in the 'flatshaded' look. |
|||||
|