Median filtering

Published June 03, 2008
Advertisement
I implemented 3x3 median-filter post-processing (yes, I'm jumping all over the place). I hope you can see the slightly more fluid appearance of the screenshot below. I'm using the method presented by Morgan McGuire in ShaderX6.



You may remember that I had image-space outlines a while ago. There's a big problem with such outlines: because they overlay the rendering, they can occlude the precious screen-space of small objects. A better solution might be rim highlights (used in some form by Valve), where the fragment brightens as the normal approaches perpendicularity with the eye vector. For additional contrast, you can use drop-shadows, calculated from the depth-difference of a fragment neighbourhood. It makes sense that receeding fragments should be darker and occluded by brighter advancing fragments.

I already have some form of rim-highlights (could be better though). I plan to swap the existing (but broken) outline code for drop-shadows soon.


Fun fact: the following is valid code. Call me a n00b, but I didn't know you could pass a class template name as a template argument like this.

template  struct A{	typedef T type;};template <template  class T, typename U> struct B{	typename T::type value;};int main(){	Bint
> b;
}
Previous Entry Phun with Loo-ah
0 likes 2 comments

Comments

dbaumgart
Noob!

(I don't think you're a noob, you just told me to call you one.)

It's been a while so it's good to see your project again even if I cannot comment much on what you're talking about because it's largely over my head and not entirely relevant to what I'm doing ... but no, that never stopped me from reading about stuff. It's fascinating and confusing.

Whenever I find those piles of cash I've been looking for I'd totally hire you to code something once I think of something to code. Yeah.
June 06, 2008 03:16 PM
dcosborn
I appreciate your comments, regardless. I'm trying to move onto gameplay as quickly as possible, but the graphics are constantly in need of improvement. Nevertheless, I hope to focus more on scripting in the coming posts, which should be more generally relevent. After all, why have a journal if its not relevent to the readers?
June 06, 2008 10:44 PM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement

Latest Entries

Advertisement