*Careful: Wall of text and technical bits*
Yes, per game.
Again some more info (all procedures below are simplified) after examining the shader.
The game sends 4 copies of the same EFB copy (2nd stage in a previous post of mine).
And also sends 4 different positions (x.y) and 4 pairs of texture matrices (x and y have separate matrix).
It uses these to transform the texture and then blend it. All of this is done serially by Wii's TEV (Texture Environment Unit) process.
It uses the result of the previous tev to blend each of the 4 images. The 1st image use the original input image.
Also the side images have less brightness than the 2 centered images, to create a fade out effect.
What I did was that I changed the positions of these images to make them more compact.
The original distance is indeed correct. In 640x480 you cant actually see the 4 images that are used for Bloom like effect because of low pixel count.
It looks, like it's really blurred on all 4 directions.
In bigger resolutions it correctly creates a scaled distance.
With a bigger internal resolution we have a lot of pixels now and we can clearly see the 4 images used.
If retro studios wanted to create a more smooth shader, they could use 6, 8, 10, etc TEV stages.
Let's explain this in transparency instead of brightness and in 6 TEV stages:
Based on Original:
img0 -> move +7 pixels. 20% transp
Blend to the original image
TEV 1:
img1 -> move +3 pixels. 50% transp
Blend to previous output
TEV 2:
img2 -> move -3 pixels. 50% transp
Blend
TEV 3:
img3 -> move -7 pixels. 20% transp
Blend and blend to our final effect image
Let's say we want this to look good on bigger resolution or more smooth in wii's original resolution:
TEV 0:
img0 -> move +7 pixels. 20% transp
Blend to the original image
TEV 1:
newimg0 -> move +5 pixels. 35% transp
Blend to the original image
TEV 2:
img1 -> move +3 pixels. 50% transp
Blend to previous output
TEV 3:
img2 -> move -3 pixels. 50% transp
Blend
TEV 4:
newimg0 -> move +5 pixels. 35% transp
Blend to the original image
TEV 5:
img3 -> move -7 pixels. 20% transp
Blend and blend to our final effect image
This will fill the spaces in between and create a more smooth blur.
So more stages, more smooth and better for bigger resolutions
Also this solution is to keep the big size bloom fx. Otherwise, they can just make the distance fixed
Let's move to your questions:
It can only be used with the same UID shader cache. Otherwise it needs a somekind of a hash function that when it finds the same shader to change it with one provided.
Well it may support this. I ddn't check actually.
So, this is an interceptor for OpenGL (yes you guessed it, must be used in OpenGL backend).
Let's go to the critical question. Can this shader or the UID cache be shared?
Yes. Gamecube/wii don't actually use shaders because it don't support it. It has a set of 16 TEV stages and you can use many in a serial way.
What you actually see as shaders and as UID shader cache, is translated vertex and pixel, plus TEV stages process, translated by Dolphin.
It's only illegal to share the original code that was translated to these. Well good luck extracting it from your rip files xD
For example, to share the UID shader cache from Wii U's game, is actually illegal.
Because WiiU has real custom vertex/pixel shader units. So some bits of the code is only translated to fit OpenGL/DirectX/Vulkun requirements.
Anyway, legislation on these is weird. (For example, wii SDK is legal to share since november of 2013, because the console stopped selling worldwide).
Some final thoughts,
Because my hands are "itchy", I will try to do both fixes above and keep the best. And then check if it can be done on the fly.