I’m trying to create shell for mesh
void VS()
{
float offset = 0.1;
mat4 modelMatrix = iModelMatrix;
vec4 pos = iPos + vec4(iNormal * offset, 0.0);
vec3 worldPos = (pos * modelMatrix).xyz;
gl_Position = GetClipPos(worldPos);
but it works incorrect for sharp angles
(red mesh - scaled shell, white - original mesh)
How to fix it?