Ugly render on clouds

后端 未结 2 827
终归单人心
终归单人心 2021-01-15 04:48

I\'m trying to implement the code from this tutorial, but in much greater proportions (radius = 100000 units).

I don\'t know if the size matters but on my earth rend

2条回答
  •  清酒与你
    2021-01-15 05:12

    What you're experiencing is z-fighting due to insufficient depth buffer resolution.

    You basically have three options to counteract this:

    1. Write / use a multi-texture shader that renders all three textures on one sphere.

    2. Increase the distance between the sphere faces. / Decrease the distance between your near and far clipping planes.

    3. Use polygonOffset and the POLYGON_OFFSET_FILL renderstate to offset depth values written by your outer sphere. Read more about polygonOffset here.

提交回复
热议问题