Intro to Multi-Pass Shaders

Hi, everyone!

I am diving into shader land and having difficulties trying to implement muli-pass shaders (or muli-pass rendering? what’s the difference?).

I can write some simple single-pass shaders, but I don’t quite know how to begin to build a multi-pass shader in BabylonJS.

What is the bare-bone concept / model / method? Most of the related topics on the forum are a bit too advanced (or into specific details) for me.

Sorry for the noob question. I would very much appreciate it if anyone can give me a birds-eye-view concept, any leads to follow, or some reading materials to begin with.

Thanks in advance!

Hi!

Most of the time you can initially fake it but having two identical meshes (like clones) using different shaders.

When that work we can talk about next step :smiley:

1 Like

Thanks!
Makes sense.
Yeah, come to think of it, this simple idea can actually do a lot of tricks.:grinning:

1 Like

Yeah and then we could talk about optimizations and using the inner deep power of babylon.js (niark niark niark…diabolic laught…)

Facing deadlines in real-world projects, I always end up with the “simple-stupid-but-it-works” kind of solution / hack, and nobody can argue against its effectiveness.

However, when I put my study hat on, the Calling of the Void is just irresistible.:joy:

1 Like