+1 vote

I've been working on this water project of mine, but I'm having some trouble masking out water from inside the boat. I know that in Unity it's possible to use the render queue to achieve this... but I haven't been able to find a similar solution for Godot shaders.
I've experimented with the DEPTH value and I even went to the second page of Google, but alas I have yet to find a solution which will suffice.

So my question is... is it possible to use a plane with a shader to mask out certain parts of the water? My node setup is that the ocean is a MeshInstance node for itself, and the mask mesh is a child to the boat's spatial node.

Here's an example of what I want to achieve (made with haste in Blender)
The water is invisible inside the boat
I also found this YouTube video of something doing it in Unity.

Godot version 3.4.4
in Engine by (25 points)
edited by

Can you add an example image?

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.