Any ideas how to do it? Now i have dynamically generated cubemap, which i use as a reflection texture on torus.
Blurring every side separately won't do the trick, right? Because of pixels near the border, which won't get blur impact from their neighbours.
Maybe i should make another FBO, bind it, "unroll" cubemap on the screen, apply basic blur shader and then separate that blurred texture into 6 sides? Not sure how to do the "separate" part.
Blurring a cubemap? That's pretty hard.
To do a mathematically correct Gaussian blur, you need to transform it to the frequency domain (spherical harmonics), apply a low-pass filter there, and then do the inverse transform. That's not a simple task.
If an approximation is enough, do the following.
For each face F of your cube, render the face F and the neighboring pixels from the other 4 faces like this:
___________
|\ /|
| \ / |
| \-----/ |
| | | |
| | F | |
| | | |
| /-----\ |
| / \ |
|/_________\|
The amount of neighboring pixels depends on blur radius.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With