Sign in to follow this  
Dirge

HDR and Bloom as fallback as seen in Oblivion

Recommended Posts

Dirge    300
K, first off I know what HDR is and I know what Bloom/Glow/Glare is. I know the differences and I've implemented them before so I don't need to see any brain flexing explanations. Sorry if that sounds kinda harsh, I just really want a straight forward answer and not a million off topic remarks, although I certainly welcome discussion. So basically I'm wondering what you guys think the difference is between the Bloom and HDR implementations in Oblivion. Recently I implemented a very exhaustive bloom implementation that uses custom shaders for a separate bloom pass in order to represent the values to bloom mostly as an effort to support previous gen graphics cards. It's way to complex and very inefficient and just plain sucks, and I started thinking, how did Oblivion do it? The HDR implementation is obvious, but what kind of implementation do you guys think they did for Bloom? I haven't observed the "glowing white shirt" syndrome from games like KOTOR (i.e. fetch backbuffer luminance, clamp, blur, add), and I don't think they do a separate pass for glow objects (which is what I had to do, yuck), and since I've noticed LOD objects blend away they appear to need their alpha channel so can't be using the store luminance in alpha trick. So what the heck are they doing? As a followup question is it even worth not using HDR on Shader Model 2 cards? Chuck, the guy who made the ATI patch that enables FSAA with HDR gives a good explanation of how he got it working and basically says he has no clue why Bethsoft didn't just get it working from the box: chuck interview and explanation. Thanks very much for any insight!

Share this post


Link to post
Share on other sites
I dont think the bloom is Oblivion is anything special.. it seems to me like a standard bloom method. You can do bloom this way without blasting out your light areas to much, just use some constants.

In my engine i just take the backbuffer, stretch it down, do a 2 pass gaussian blur, then run a final bloom shader like this:

static const half BRIGHT_PASS_THRESHOLD = 0.4f;
static const half BRIGHT_PASS_OFFSET = 1.0f;

half4 PS_Bloom( half2 Tex: TEXCOORD0 ):COLOR
{

half4 vSample = tex2D( g_samSrcColor, Tex );

// Subtract out dark pixels
vSample.rgb -= BRIGHT_PASS_THRESHOLD;

// Clamp to 0
vSample = max(vSample, 0.0f);

// Map the resulting value into the 0 to 1 range. Higher values for
// BRIGHT_PASS_OFFSET will isolate lights from illuminated scene
// objects.
vSample.rgb /= (BRIGHT_PASS_OFFSET+vSample);
return vSample*0.9;

}

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