Shaders: How to deal with sharp corners / edges in the model

The typical way to deal with this is to set a maximum angle; when calculating normals for a vertex, you take the dot product of adjacent face normals and don’t consider them if they make an angle of more than, say, 30°.

Another way to do it is just to keep the mesh parts for the bottom and the side separate, ie. have two sets of vertices on the bottom ring, one used for the cap and the other for the tube. This is probably an easier approach if you have control over the geometry generation.