indigo icon indicating copy to clipboard operation
indigo copied to clipboard

Multi-pass shaders

Open davesmith00000 opened this issue 3 years ago • 0 comments

Murky territory, may not do for the next release (0.7.0).

What is the difference between a multipass shader and a for loop? Or literally calling the shader again with an incrementing integer?

The answer (I think) is feedback, it's the ability to create data in one step that can then be used to calculate the next step. Just as one might refine/hydrate data in some intermediary stage before calculating an answer. For that, you need a render target. Or many render targets.

With one render target would could build something in. With many we're in the territory of runtime code generation again. Which is ok but not right now.

Related subjects:

  1. Shader DSL (Macros)
  2. Render targets
  3. Related (or not?): Render targets could be like layers, but they render to a texture? Would need to be rendered first and would need some way to plug the result into a later shader?

davesmith00000 avatar Mar 20 '21 15:03 davesmith00000