Toughts on the Post Processing Chain

Image effects often need preprocessed images depending on what they should do. Several image effects might need a blured source image and right now every Filter would do it themself in a prepass. It would be nice if one could only do the bluring once and then let the filters share that texture.

Maybe one could have some object/manager where one could add rendered textures to, for instance if filter A needs a depth texture it first checks with the manager if it’s already rendered otherwise it will render it itself and register the rendered depth texture with the manager. When it’s time for filter B, that also needs a depth texture, it will just reuse the one already rendered by A.

The reason I’m thinking about this is with my deferred renderer I need to produce a depth texture and a normal texture and If I could somewhere register these textures as rendered then for instance the SSAO effect could reuse them.

Actually it’s already the case for the depthTexture. a filter just has to return true to the isNeedDepthTexture method to get fed with the depth texture.

I already thought of doing this for the normal texture, because it’s needed for SSAO and cartoonedge for example. But i postponed that until we implement deferred rendering in the engine :D, so i guess that’s why you had that thought too ;).

Making it more general could be nice

Yeah, I know one can get a depth texture in the filters :slight_smile: it was a bad example but you catched what I meant at least. Then I can just sit around and wait until it’s implemented, sweet ^^