Sign in to follow this  
Vincent_M

Multiple Post Processing Effects

Recommended Posts

Vincent_M    969

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?

Share this post


Link to post
Share on other sites
Alundra    2316

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.

Edited by Alundra

Share this post


Link to post
Share on other sites
swiftcoder    18437

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).

Share this post


Link to post
Share on other sites
Vincent_M    969

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".

Edited by Vincent_M

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this