Multiple Post Processing Effects

Started by
2 comments, last by Vincent_M 11 years, 1 month ago

I have a few post processing shaders setup, and they work great separately, but if I wanted multiple effects, I would render the scene to a texture, post process it, render it as a fullscreen quad, then render that to a texture, etc until all effects have been processed.

Is it possible to continue forwarding all rendering to the current texture I'm working on, or would I have to render to a texture per effect?

Advertisement

You have two options :

The first is to combine some effects in one shader as uber-shader.The second is to use a compute shader who output to a new texture or modify the same input as a read-write buffer.The nice way of the compute shader is the multi-threading.

Is it possible to continue forwarding all rendering to the current texture I'm working on, or would I have to render to a texture per effect?

One typically has a pair of textures, and repeatedly switch between the two of them (the term 'ping-pong' comes to mind).

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

At first I was thinking uber sharer but then is be locked down to a specific order of how effects would be applied which I think could yield different results. For example, if I add deferred rendering, I'd want to implement that first before blur or desaturation.

I like the idea of having two textures and switching between them similar to how most implementations of OpenGL use double buffering (ES on iOs is straight render-to-texture IIRC), then render the final product as a quad.

EDIT: I wanted to post this YouTube video that not only walks the viewer through how to create a few common post processing effects, but appears to implement the ping-pong texture example that swiftcoder mentioned (although I have to watch the entire thing still).

Thank you, swiftcoder and Alundra, for your help! I'll post up some screenshots of the results when I can, and then we can deem this thread "RESOLVED".

This topic is closed to new replies.

Advertisement