Sign in to follow this  
Interoban g

Glow and RenderTargets

Recommended Posts

Ok, so I am trying to create a Glow effect using Post Processing. I want it to be on individual objects, so I need to create some sort of indentifier, so that the post porcessing knows which part of the object to blur. The most common solution it appears is to have a signature number in the alpha channel that can be checked, however using RenderTargets to get to my Post Processing, I cannot seem to get it to keep track of the alpha information. Is it something I'm missing with Render Targets, as it seems many others have gotten a glow effect this way.

Share this post


Link to post
Share on other sites
You're probably doing alpha blending/testing with the fixed-function pipeline.

Since you're using MRT anyway, have you considered writing a 'bloom scale' value into a channel of another render target? Or was that what you were trying to do with the alpha channel anyway?

Share this post


Link to post
Share on other sites
Not so much a bloom scale, if you mean amount to bloom each pixel, but more of a mask.

I'm trying to see if I can avoid multiple full renders by saving that mask, I tried the Stencil buffer as well but whenever I turned off stencilling during Post Processing the Pixel Shader would start returning garbage texture parts.

Share this post


Link to post
Share on other sites
Quote:
Original post by Interoban g
The most common solution it appears is to have a signature number in the alpha channel that can be checked, however using RenderTargets to get to my Post Processing, I cannot seem to get it to keep track of the alpha information.


What do you mean by this? Unless you have alpha blending enabled, a render target's alpha channel will get whatever value you output from your pixel shader. Then that value will be there when you sample it later in your post-processing pass.

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