3D Outline Shader


#1

Hello, I’m trying to add some outline effect for 3d objects and it looks Im stucked :frowning_face:

What I have tried:

var outlineShader = new h3d.shader.Outline();
outlineShader.size = 0;
outlineShader.distance = 1;
outlineShader.color = new Vector(1, 1, 0);

instance.getMaterials()[0].mainPass.addShader(outlineShader);

The result is:
image

With outlineShader.size = 1:
image

And what I want to reach:
image

Any idea / hint? Maybe It should be handled in a totally different way - I’m not so experienced with 3D :confused: