PDA

View Full Version : Tom's HDR Rendering Demo...



savage
07-06-2005, 12:19 PM
Tom Nuydens ('tom at delphi3d dot net') has been quiet for quite some time, but he's back and now with a great new HDR demo...
<blockquote>

I wrote a demo that does high dynamic range (HDR) rendering. It uses the EXT_framebuffer_object extension for its render-to-texture operations. The demo renders a scene into a floating point buffer, using a simple lighting model and some shadow mapping. The HDR portion of the image is then run through a separable gaussian blur filter and composited back onto the LDR portion, resulting in a fashionable-looking glow effect. You can get the demo right here ('http://www.delphi3d.net/download/hdr_fbo.zip'). As usual, it may or may not run on anything other than a GeForce 6x00 :)

</blockquote>
For a screen shot of the HDR effect visit Tom's Home Page : http://www.delphi3d.net/ ('http://www.delphi3d.net/')

Sly
07-06-2005, 10:23 PM
You've got two links in that news post. One to Tom's email address (with anti-spam stuff), and the other direct to the zip file of the demo. You should also provide a link to his webpage, as he often puts screenshots of the demos on the front page of his site.

savage
08-06-2005, 01:03 PM
Done.

tux
08-06-2005, 01:39 PM
wont work on ati cards? :(

JSoftware
08-06-2005, 03:50 PM
nope.. requires sm3.0 it has branches in it..

Clootie
12-06-2005, 09:17 PM
This code can be compiled on HW without branches support (given enought instruction slots):

void main&#40;void&#41;
&#123;
vec4 color;

// This test is there to kill reverse projections from the spotlights&#58;
if &#40;tc_shadow.z > gl_DepthRange.near&#41;
&#123;
// Attenutation&#58;
float a = 1.0 - clamp&#40;length&#40;L&#41;/75.0, 0.0, 1.0&#41;;
// Diffuse&#58;
vec4 I = max&#40;dot&#40;normalize&#40;N&#41;, normalize&#40;L&#41;&#41;, 0.0&#41; * brightness;
// Sample the spotlight "gel" texture and the shadow map&#58;
vec4 gel = texture2DProj&#40;t_gel, tc_shadow&#41;;
vec4 s = shadow2DProj&#40;t_shadow, tc_shadow&#41;;
// Final shaded color&#58;
color = a * Kd * I * gel * s;
&#125;
else
&#123;
// Fragments behind the projector are black.
color = vec4&#40;0.0, 0.0, 0.0, 1.0&#41;;
&#125;

// We write the LDR and HDR portions of the image to separate images.
// LDR is the &#91;0, 1&#93; part&#58;
gl_FragData&#91;0&#93; = min&#40;color, 1.0&#41;;
// HDR is everything that's > 1&#58;
gl_FragData&#91;1&#93; = max&#40;color - 1.0, 0.0&#41;;
&#125;
Main reason why Tom's demo is not running on ATI cards - is the lack of support of EXT_framebuffer_object extension. But it's rather new and people just have to wait for ATI to release new drivers (not sure maybe Cat 5.6 already supports it?)

JSoftware
12-06-2005, 09:37 PM
hmm at closer thought i must agree with you, clootie..

Traveler
13-06-2005, 07:30 AM
As usual, it may or may not run on anything other than a GeForce 6x00

Odd,.. while all demos are working nicely, this one is a no go for my 6800gt too :cry:

Clootie
13-06-2005, 09:41 AM
Traveler: Just download newest [unofficial] drivers :D

Traveler
13-06-2005, 02:28 PM
I did try the newest, but not the unofficial version.
I'll try though, thanks!