davidedmundson updated this revision to Diff 12710. davidedmundson added a comment.
Oh I see, rather than grabbing two texels and interpolating the average value you're sampling between them and letting the GL return the relevant value. My previous code would break that as I was effectively sampling between every other pixel, rather than actually interpolating properly. Output looks OK, but technically wrong. I still think the overall concept of downsampling high DPI buffers is the simplest, which gives two options: - we grab the scratch at native resoltion, then explicitly make a second scratch texture at half the size which we render the first texture into. - we blit the framebuffer as that allows us to do the transformation all in the same pass. GLRenderTarget::blit already has all the transformation code so it keeps the code super simple. This patch does the latter. It's faster than the extra pass, but has the obvious downside that not all hardware supports blitting, but realistically any hardware that supports 4k output will. The screenshot effect already relies on blit being supported, so I think it should be safe. (right?) CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D4963?vs=12247&id=12710 BRANCH scaling_final REVISION DETAIL https://phabricator.kde.org/D4963 AFFECTED FILES effects/blur/blur.cpp To: davidedmundson, #plasma Cc: fredrik, plasma-devel, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol
