Fixes indirect rendering modes such as some 3D modes mentioned in #11437 and undersampled rendering. Does not fully fix anaglyph 3d mode.
Co-authored-by: x2048 <codeforsmile@gmail.com>