Edgerender color effect



2
picture first and second edgerender is support。
but how to achieve the effect like picture 3(affected by depth,top edgerender and other edgerender can set different color )

2 Likes

One way to do it is to duplicate the object:

  • for the first one, set the material depth function used to draw the edges to Always so that all lines, even the hidden ones, are drawn
  • for the second one, draw it as usual with the edge renderer enabled

Use a dimmer color / lower edge width to draw the first object to get the effect you are after:

https://playground.babylonjs.com/#C8AKBI

image

4 Likes