Hi
When creating a Line I needed to have a fixed width in pixels, no matter the zoom or camera position. The renderEdges was not the solution cause it was wider with the zoom.
I found renderOutline that is behaving weirdly with LineMesh. The outline is drawn next to the LineMesh. It’s not creating the outline. And setting outlineWidth makes it separate even more from the LineMesh:
White is the line, Green is the outline.
https://playground.babylonjs.com/#QVV8DJ#6
I do not know how to correct this.
Also if this will not be my solution can you tell me how to modify, shaderMaterial with:
curve.material.customShaderNameResolve = (s): string => {
const vertex = Effect.ShadersStore['colorVertexShader'];
const pixel = Effect.ShadersStore['colorPixelShader'];
Effect.ShadersStore['color2VertexShader'] = shader.replace('<what>', '<with what?>');
Effect.ShadersStore['color2PixelShader'] = Effect.ShadersStore['colorPixelShader'];
return s+ '2';
};
To have a consistent line width? Like always 3px width no mather the zoom? What should I put in:
'<what>', '<with what?>'
Regards
Peter