Project Declension 2008 (Yes! Crepuscular rays)
-
- Posts: 331
- Joined: Sat Sep 02, 2006 4:11 am
- Location: Michigan
- Contact:
No you should blur based on luminance, not everything at once! Right now you are lerping everything no matter how bright it is.
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
Check this out again. Bloom + tonemap.
my formular:
my formular:
Code: Select all
float4 color = sharp * 0.6 + blur * (0.5 * luminance(blur));
texCoord -= 0.5;
float vignette = 1 - dot(texCoord, texCoord);
color *= pow( vignette, 1.0 );
color *= expo;
return pow(color, 1.05);
Does your RTT match the screen resolution? There appears to be some major aliasing...
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
Obviously, Irrlicht doesn't allow me to render at 1024x1024 when my testing resolution is at 1024x768. I could up it to suit my desktop's or tv's and use unlimited shader instructions, but that isn't widely supported by many people.
Oh well, maybe I should render at 1280x1024.
http://www.orandysoftware.com/user_file ... clarge.jpg
Oh well, maybe I should render at 1280x1024.
http://www.orandysoftware.com/user_file ... clarge.jpg
Infact, the patch is only needed for creation of a bigger (Z buffer? I think), so in this case it is irrelevant as he needs the size to be the same as the device resolution, and there is already a backbuffer big enough for that. All he needs to do is remove the pow2 check from RTT texture creation in the DX9 drivers, its a 2 second procedure.
(Or you could just use OpenGL)
(Or you could just use OpenGL)
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
-
- Posts: 331
- Joined: Sat Sep 02, 2006 4:11 am
- Location: Michigan
- Contact:
I would like to try the patch, but I'm using IrrCP.
Anyway, if this next one isn't bloom, then it's ugly bloom. I did bloom+blur+tonemap+highpass and downsampled to 512x512. I think the color bleed is a little too much. BTW, I'll work on calculating the scene luminance, realtime. Right now, too much of the bright areas are 'bloomed', and if I reduce it, the contrast isn't right.
http://www.orandysoftware.com/user_file ... _bloom.jpg
Thanks for your help.
EDIT*
A little tweak, and I didn't downsample anything.
http://www.orandysoftware.com/user_file ... om1024.jpg
Probably the best I think. EDIT** Not!
Anyway, if this next one isn't bloom, then it's ugly bloom. I did bloom+blur+tonemap+highpass and downsampled to 512x512. I think the color bleed is a little too much. BTW, I'll work on calculating the scene luminance, realtime. Right now, too much of the bright areas are 'bloomed', and if I reduce it, the contrast isn't right.
http://www.orandysoftware.com/user_file ... _bloom.jpg
Thanks for your help.
EDIT*
A little tweak, and I didn't downsample anything.
http://www.orandysoftware.com/user_file ... om1024.jpg
Probably the best I think. EDIT** Not!
Last edited by jingquan on Wed Dec 19, 2007 10:51 am, edited 1 time in total.
Yeah! Got the final bloom done. No more unnecessary blurring except at bright areas. I reduced the bloomed textures to 1/4 of my orginal for color bleeding.
Now I see unblurred images are alot nicer. I had them posting in my website (below). Check them out!
Now, I'll work on sampling the luminance for the brightpass.
Now I see unblurred images are alot nicer. I had them posting in my website (below). Check them out!
Now, I'll work on sampling the luminance for the brightpass.
-
- Posts: 331
- Joined: Sat Sep 02, 2006 4:11 am
- Location: Michigan
- Contact:
I know why my bloom looks ugly now. The texel alignments are all wrong, which the rtt texture will shift towards the lower right corner. I've a luminance sample to adjust the brightness. Not yet HDR but it's getting close. Here's two screendumps, the first looking from a dark area will have any lightsource brighter. Moving towards it will lower the luminance.
OK. I'm wondering how I can go about doing the eye adaption, which is just smoothing out the transition of brightening/darkening.
THanks.