HDR shading sample?

Started by
3 comments, last by vidalsasoon 18 years, 8 months ago
My outdoor game supports shaders but it's at the point where it needs good lighting and shade. I'm having trouble understanding all that shader mumbo jumbo without an example... Where I could see this in action with C#?
Advertisement
Quote:Original post by vidalsasoon
My outdoor game supports shaders but it's at the point where it needs good lighting and shade.

Do you actually want HDR (High Dynamic Range) lighting as per your topic, or are you just after advanced lighting?

Whilst I love HDR and do think it generates by far the best images I've seen in a long time, it is also possible to get some pretty brilliant effects just by implementing better lighting models in the pixel/vertex shaders and then picking a suitable shadowing algorithm (e.g. PSM/TSM shadow maps).

Quote:Original post by vidalsasoon
I'm having trouble understanding all that shader mumbo jumbo without an example...

Where I could see this in action with C#?

Have you tried the SDK samples? HDRCubeMap and HDRFormats in particular?

Although, it does seem that the best sample (C++'s HDRLighting) doesn't have a MDX/C# counterpart. But I'm sure you could still have a look at the sample and get a good idea of what's actually going on [grin]

hth
Jack

<hr align="left" width="25%" />
Jack Hoxley <small>[</small><small> Forum FAQ | Revised FAQ | MVP Profile | Developer Journal ]</small>

well from what I understand, HDR lighting can handle both shadows and lighting at the same time. also, word around the net is that HDR is a good thing.

I'm having trouble understanding how it all fits together however.

i.e. I have an ocean shader in my game (just a plane mesh that uses Ocean.fx). I'm not sure how HDR will pick up on it and draw shadows on the water or light it correctly... same goes for all the objects in my scene.

Maybe i'm moving too fast.

Quote:Original post by vidalsasoon
well from what I understand, HDR lighting can handle both shadows and lighting at the same time. also, word around the net is that HDR is a good thing.

I'm having trouble understanding how it all fits together however.

i.e. I have an ocean shader in my game (just a plane mesh that uses Ocean.fx). I'm not sure how HDR will pick up on it and draw shadows on the water or light it correctly... same goes for all the objects in my scene.

Maybe i'm moving too fast.

Yea, I think you don't really understand what HDR actually is. HDR isn't an illumination model (it doesn't light geometry) or a shadow model (it doesn't shadow geometry).

Read this intro from the 'HDR Lighting' sample:

Quote:
Lighting in the real world contains a very high dynamic range (HDR) of luminance values. The real world has about 10 orders of dynamic range (DR) for luminance values spread across the spectrum of darkness to brightness. On the other hand, a computer screen has a very limited display gamut (or range of luminance values): approximately two orders of dynamic range. The challenge to producing HDR rendered images is to map the real world HDR values into the limited gamut of a computer screen.

Basically, HDR allows you to map a wider range of brightness values on your screen. This makes everything look a lot better, since the real world has a very wide range of luminances.

Blooming, which you may have heard of, is a technique that applies artifical glares and streaks to really bright values. This makes it look similar to when you look into a bright light or the sun.

Quote:
I'm having trouble understanding how it all fits together however

The challenging part in all this is not really implementing each individual feature or effect. It's easy enough to have an app that showcases soft shadowing. However, it requires some finesse to combine soft shadowing, PRT, and HDR into the same rendering pipeline, while maintaining an acceptable level of performance.
Dustin Franklin ( circlesoft :: KBase :: Mystic GD :: ApolloNL )
thanks guys, all very helpful.

V.

This topic is closed to new replies.

Advertisement