How to handle custom post processes with float type passPostProcess?

Hi everyone,

I’m currently working on a custom post-process pipeline that necessitates the input texture to be in float format (to accommodate values exceeding one).

I attempted to set the passPostProcess texture type to float, but it doesn’t seem to be effective; my incoming texture remains clamped to 1.

Please find below a playground that reproduces what I’m trying to achieve:

What could I be doing wrong?

4 Likes

Welcome aboard!

The texture of a post-process is used as the output texture for the previous post-process of the chain!

So, in your PG:

  • the texture (T0) from postProcess0 is used to render the scene
  • the shader of postProcess0 is run with T0 as the input texture and is rendered into the texture (T1) of postProcess1.
  • the shader of postProcess1 is run with T1 as the input texture and is rendered into the canvas

So, you want both textures to support float for your PG to work:

3 Likes

Hi Evgeni,

Thank you very much, it works !

I understand my mistake, I thought that T0 was the output of postProcess0 and T1 the output of postProcess1 (in case of a postProcess2, otherwise directly rendered into the canvas).

Thank you again !

2 Likes