Thank you very much HeelX and Kartoffel, that basically confirms that I am doing it correctly laugh

Kartoffel:
Quote:

When upsampling you have to be careful about the resolutions. if for example:
screen_size.y (1080) / 16 = 67.5 -> you have to compensate the difference that the .5 causes.

do you mean downsampling? because there I am going with ceil(size/factor), which slightly destroys the average by not sampling exactly between the pixels, but that shouldn´t be a problem.

Quote:

What I did: render the average of multiple samples into a 1x1 texture. I'm pretty sure most games do something similar.

I plan to go all the way down, which aren´t as many stages as one expects tongue

Quote:

About gamma correction: I'm not doing any gamma-correction (I'm not sure if it's THAT important),
however gamma correct lighting is important.

isn´t that kinda the same? the diffuse textures for example are already gamma corrected, so I have to tell the graphics API to transform them to linear color space where I apply the lighting and the result is then again gamma corrected, transforming it into gamma space.

Quote:

Well... yes thats all you need to make HDRR possible.
However, I use bloom (and a little color modification) to illustrate colors which are out of range,
my tonemapping just adds some sharpness.

What do you use for tone mapping? Are you applying the bloom before or after the tone mapping? (http://frictionalgames.blogspot.de/2012/09/tech-feature-hdr-lightning.html states that the bloom should be applied before the tone mapping)



HeelX:
Quote:

As I understand, you don't need to do this, because the center of a pixel in the lower texture is in correspondence with the center of the according 2x2 source pixels:

Does this mean that gamestudio already does the half pixel offset?

Quote:

I don't know much about HDR processing, but since you always loose some luminance during a straight forward gaussian pyramid on RGB images (even with high precision floating point targets), you should normalize the image accordingly when going up the pyramid again - and then the bucket procedure you did before with 8888 targets will lead to some artifacts I guess (maybe these are those bands you see.. I don't know).

Those banding artifacts are easily solved with fp targets and are caused by a low precision of the really dark parts in linear rgb space which are streched over a bigger range after gamma correction.
But does this mean, that I´ll have to do some kind of upsampling, just like I did for the downsampling?
Currently I completely removed any upsampling and blurring and just use the result of blurring a low res target, but the result is flickering, as if I´d do the downsampling wrong and the applied bloom is quite blocky. Any ideas on this?
How could I effectively blur my bloom texture in you opinion?

Quote:

Since a whole pyramid is costly, I would try to avoid FP targets under any circumstance, but that is just a gut feeling...

It seems like everyone uses them a lot and from my experience so far this is not an issue at all, at least as long as my bottleneck is a stupid cpu stall I can´t find a solution for.


Some more stuff:
I am not using gamestudio for this, but a custom OpenGL renderer, but thought I might use this to get some discussion into this forum, as I am still visiting on an hourly basis and not much is happening frown

Here are two more very usefull links about tone mapping, HDRR and some more stuff (like the idea of not applying SSAO to the direct lighting term (but other than that their SSAO solution is really dirty, but does its job on the screenshots)):
http://de.slideshare.net/ozlael/hable-john-uncharted2-hdr-lighting (lighting in uncharted 2 with lots of details on gamma and tone mapping)
http://filmicgames.com/archives/75 (overview of the tone mapping from the other link, by the same guy)

Today I experimented with gamma and tone mapping and somehow I am not that happy with my results. Ignoring gamma and without tone mapping, there seemed to be much more contrast in the image which in my opinion looked better. On the other hand, tweaking the exposure and ambient and using the uncharted 2 tone mapping, I got at least kinda close to what it looked like before, only the bloom still doesn´t have the power it had before and I am not exactly sure what kind of value would make sense for the whitepoint.
Here are some screenshots:

(no gamma, no tone mapping, the bloom is obviously a bit overdone :P)


(correct gamma handling, no tone mapping, fp targets)


(correct gamma, uncharted 2 tone mapping, exposure of 5, using ldr targets with 24bit colors)


(correct gamma, uncharted 2 tone mapping, exposure of 5, using hdr fp targets, tweaked and overdone bloom :P, lower ambient)

I tried to find similar screenshots, but camera and sun positions change a bit and I also tweaked different setting trying to make things look better (or worse :P)


Edit: Setting the whitepoint to something closer to the actual highest brightness, I can use a lower exposure and it looks better in my opinion :

(exposure=1.0)


(exposure=2.0)