Post Processing in Directx
Must the Post-Processing to the image be done only after everything is rendered? Or is it possible to render Object A, do a Post-Processing to add glow, then render Object B, Object C etc. However i only wish for object A to have the glow effect.
Thanks in Advance
you can, but no one guarantees that the results will be appropriate. for instance, you add glow to A, then draw B which is behind A, but B covers the glow.
You may try playing with the stencil buffer to add glow only to A.
You may try playing with the stencil buffer to add glow only to A.
To get glows on individual objects you could consider a mask buffer using MRT (or just a seperate pass).
Have a look at my HDRDemo/HDRPipeline code in the DirectX SDK, across the top of the display you'll see the bloom post-processing effect being generated. The key observation is the first "bright-pass" filter that eliminates any pixels you DONT want to have a bloom effect.
Back to your example, either during normal rendering (e.g. via MRT or some other alpha-channel flagging) or as the first step of post-processing you need to identify the pixels contributing to the object you want blurring - my code just identifies pixels with a brightness over a certain threshold - and then you perform the blur operation.
By doing it this way you should solve the problems that ReaVeR-Andrey pointed out.
hth
Jack
Have a look at my HDRDemo/HDRPipeline code in the DirectX SDK, across the top of the display you'll see the bloom post-processing effect being generated. The key observation is the first "bright-pass" filter that eliminates any pixels you DONT want to have a bloom effect.
Back to your example, either during normal rendering (e.g. via MRT or some other alpha-channel flagging) or as the first step of post-processing you need to identify the pixels contributing to the object you want blurring - my code just identifies pixels with a brightness over a certain threshold - and then you perform the blur operation.
By doing it this way you should solve the problems that ReaVeR-Andrey pointed out.
hth
Jack
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement