0 votes

Hey there. I'm making a 3D game, and I need to make a slice shader (example).
I don't need it to be solid where the slice happened, but it would be nice. The way I'm trying to do it is using a shader material for the mesh I want to slice. If the fragment world position is inside the area culled, ALPHA = 0.. That brings two problems, though:

  • Apparently, setting the ALPHA for any fragment in the object makes it transparent
  • I can't get the world coordinates for the fragments in the mesh itself

If I follow this tutorial, I get the wold coordinates for the fragments behind the mesh.

Any ideas on how I can get it to work? :(

Edit: I solved the alpha problem. Just had to set the flag depth_draw_always. Still can't get the position, though
Edit2: For anyone else who needs help getting the world coordinates, someone on reddit gave me the answer

asked May 21 in Engine by Alack Sunrider (50 points)
edited May 22 by Alack Sunrider

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 How to use this Q&A? before posting your first questions.