
My current approach looks like this:
[source lang="cpp"]vertex_output o;float4 world = mul(MATRIX_MVP, v_in.vertex);float4 normal = mul(MATRIX_MVP, v_in.normal);o.pos = world + (normal * 1.05f);return o;[/source]
It's pretty obvious what it does, it offsets the vertex by a fraction of it's normal it works reasonably well for objects that don't have a lot of duplicate vertices to create sharp edges, like the blue around the solider for example. But it does not work at all around the weapon due to the sharp edge/duplicate vertices.
Now, my question is pretty simple: Is there a better way of achieving this effect, and more specifically offsetting the vertices in the shader.






