Well, it's not perfect and it's done differently but I've come up with something. I think the technique in the tutorial is better but I don't think stencil buffers are available in Godot. The main issue I am having now is with light and shadows. I would like for my cross-section shader to not affect the shadows of the original mesh, ie: I want the hidden parts to still cast shadows. What I have is #2 in the image below, what I want is #3 (Photoshopped).

Any suggestions on how to fix this would be very much appreciated!
For anyone interested, the shaders I used to make the cross section are as follows. There are two of them, the first one generates the red cross-section, take note of the render_modes, they are very important. The second draws the rest of the geometry that hasn't been cut away. I set the second shader as the "next pass" property of the first shader. Right now they just hide everything that has a Z position that is < 0.
Shader One:
shader_type spatial;
render_mode blend_mix, depth_draw_alpha_prepass, unshaded, cull_front;
varying vec4 world_pos;
uniform vec4 sectionColor : hint_color;
void vertex() {
world_pos = WORLD_MATRIX * vec4(VERTEX, 1.0); // get coords as world coords
VERTEX -= (NORMAL * 0.001); // bias to stop z-fighting with neighboring meshes
}
void fragment() {
if(world_pos.z >= 0.0){
ALBEDO = sectionColor.rgb;
} else {
discard;
}
}
Shader Two:
shader_type spatial;
render_mode blend_mix,cull_back,diffuse_burley,specular_schlick_ggx;
varying vec4 world_pos;
uniform vec4 baseColor : hint_color;
void vertex() {
world_pos = WORLD_MATRIX * vec4(VERTEX, 1.0); // get coords as world coords
}
void fragment() {
ALPHA = 1.0;
if(world_pos.z >= 0.0){
ALBEDO = baseColor.rgb;
} else {
discard;
}
}
There is likely a better way of doing this, and if there is I'd love to know about it. I haven't tried it on large complex meshes yet so I don't know how it will to performance wise.