There is a logical error in your code. Every mipmaps is a power of two smaller than the previous one, not linearly so. To get the result you want the code should be:

return tex2Dfetch(samplerMipmap, int4(floor(vpos.xy / exp2(iUIMiplevel)), 0, iUIMiplevel)).rgb;

Funny enough I made the same mistake in the D3D9 implementation of tex2Dfetch. Which is why it "worked", when it should not have. It's fixed now:

github.com/crosire/reshade/commit/e1ae7c...282b6d7319d307eab464.

The OpenGL implementation is hard to fix. It needs to flip the Y coordinate, but that's only trivial if the input coordinates are guaranteed to go all the way from 0 to texture height. Which is not the case with your shader. Which is why it fails. Can't think of a good way to fix this unfortunately.