One mesh behind other mesh still visibile

odotdotdotodotdotdot Posts: 2Member

I've got a scene here with two mesh instances. One of them is a sphere mesh; one is a plane mesh, for which I've written a shader to turn the plane into a sphere.

Here it is in wireframe. The pink plane mesh clearly wraps around the sphere. I would expect not to see the sphere at all when rendered.

But this is what it looks like in game.

Am I missing a flag somewhere to enable the expected behavior?

Comments

  • MegalomaniakMegalomaniak Posts: 4,803Admin

    Occlusion culling? Which version of godot are you using?

    Some things for that were introduced in 3.4 but I recommend you read through the whole linked page.

  • odotdotdotodotdotdot Posts: 2Member

    This is 3.2.3 stable.

    I ended up getting around the issue by switching from a plane mesh to a box mesh with 0 height.

    Must be something about the way the underside of the plane is understood.

  • CalinouCalinou Posts: 1,384Admin Godot Developer
    edited September 2021

    You need to make the white material opaque instead of transparent to fix transparency sorting in this situation.

    Alternatively, you can tweak one of the materials' Render Priority, but here, you want to make the white material opaque instead. Opaque materials are faster to render compared to transparent material.

    PS: Godot 3.2.3 is no longer supported. Upgrade to 3.3.3 to continue receiving support :)

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file