• entries
    232
  • comments
    1462
  • views
    956613

Cube map blurring

Sign in to follow this  
Ysaneya

714 views

Good news, i've finally got a working version of cube map blurring (required to have seamless edges between the faces of the cube). Initially i implemented something similar to ATI's cube gen, but this was 500 times slower than my original blur (without edge fix). I've put a lot of effort on it, but i successfully fixed my original blur with the edge fix. This involved drawing lots of diagrams on a paper to find all the possible configurations, and adjusting the sampled texels around the borders of each cube image. A real pain to code. But now i've got a nice 360? starfield.

I'm now going to work on a few optimizations. Even if my blur is 500 times faster than ATI's one, there's still room for improvements. There are a few "ifs" that can be put outside a loop, and i can generate the blur in monochromatic space instead of blurring a real RGB image. I am trying to reach a few tens of seconds max to generate a single 1024x1024x6 cube starfield (it's still a couple of minutes right now, but better than the 2 or 3 days required with ATI's blur :)).

By the way, if you are wondering, i'm using a 2-pass blur with an o(n^2) loop, while ATI's code seems to be using a brute-force blur with an o(n^4) loop. This is only possible because i'm using a box filter (with a gaussian filter i'd have to use an o(n^3) loop).
Sign in to follow this  


2 Comments


Recommended Comments

You mean a video of the 360° starfield .. ? I can probably do that yeah.. By the way i did not understand your German expression :) I'm not speaking German, sorry :)

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now