Cross section shader


I have a project in unity, is 3D viewer and cross section shader. I used an unity plugin (

I need the same at playcanvas and I was asking: is there someway to get a cross section shader? Today I don’t know how to start… :frowning:

Maybe will be interesting a little ‘assetstore’ for playcanvas to share scripts.


You can use shaders with PlayCanvas but it’s one of those things that you have to write yourself.

There’s a few samples here of shader effects:

Looks like it is made up of two parts:

  • An occlusion plane effect
  • The cross section ‘filler’

You can try to port the shader you used in Unity to GLSL as the math and logic would be the same or at least similar.

Edit: Here’s an example of a similar effect in WebGL: