Jump to content

  • Log In with Google      Sign In   
  • Create Account

Multiple Post Processing Effects


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 Vincent_M   Members   -  Reputation: 638

Like
0Likes
Like

Posted 20 February 2013 - 06:17 PM

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?



Sponsor:

#2 Alundra   Members   -  Reputation: 866

Like
0Likes
Like

Posted 20 February 2013 - 08:53 PM

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, 20 February 2013 - 08:55 PM.


#3 swiftcoder   Senior Moderators   -  Reputation: 9991

Like
3Likes
Like

Posted 20 February 2013 - 09:45 PM

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 - Software Engineer @Amazon - [swiftcoding]


#4 Vincent_M   Members   -  Reputation: 638

Like
0Likes
Like

Posted 21 February 2013 - 12:12 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".


Edited by Vincent_M, 21 February 2013 - 04:17 AM.





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS