Bloom Down\Up Scaling (staying on pixel center)

Started by
4 comments, last by REF_Cracker 9 years, 4 months ago

Hi All,

With just linear sampling I'm down scaling to 1/8th the size and then up scaling back to full res.
I find that this process offsets the filtered results from the original pixel center.
I'm wondering if there is anyway to adjust the down\up scaling to keep the filtered result around the pixel center.

See this image... the dot is the single pixel I'm trying to filter and the area around it is the filtered result...
(You'll have to view it at full res)

Any ideas or am I being too nit picky?

Note: This is using the DX11 API!

Thanks!

[attachment=25172:GameDevOffset.png]

Check out my project @ www.exitearth.com

Advertisement

I just realized that since I'm collapsing essentially 8X8 pixels to 1X1 and then back to 8x8.
If only one pixel in an 8x8 grid was white then when sampling back to full resolution we have lost information about which pixel location in the 8x8 was white.

I wonder what could be done to combat this?

Check out my project @ www.exitearth.com

Well, if you want to keep the information at that level of detail, you need to keep the same resolution texture, thats literally what 'resolution' means, how well you can resolve the detail. If you provided more information about what problem you are trying to solve maybe we could provide some alternatives?

You can use a wider filter when downsampling. Instead of a 2x2 box average, try a 5x5 Gaussian, etc...

It looks like your sampling positions and/or filtering weights are incorrect. Can you post your code for downscaling/upscaling?

Okay so I was able to mitigate this issue by:

- Summing 4 taps on the first 2 down samples

- Then blurring on the subsequent down samples as Hodgman suggested
- Then composting 4 layers of bloom from the various levels (Up sampling the lower resolution ones a few times to mitigate the blockiness)

It actually takes a lot of tweaking to try and get a nice blur...
Does anyone have any advice on how to achieve a good inverse square falloff on the bloom?
So far I'm just tweaking and weighting each composite layer as well as number of iterations and sigma on blur at each layer by eye.

Here's the result from a 1 pixel bloom so far... Not quite as nice as I want but getting there..

Check out my project @ www.exitearth.com

This topic is closed to new replies.

Advertisement