<table><tr><td style="">davidedmundson updated this revision to Diff 12710.<br />davidedmundson added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D4963" rel="noreferrer">View Revision</a></tr></table><br /><div><div><p>Oh I see, rather than grabbing two texels and interpolating the average value<br />
you're sampling between them and letting the GL return the relevant value.</p>

<p>My previous code would break that as I was effectively sampling between every other pixel, <br />
rather than actually interpolating properly. Output looks OK, but technically wrong.</p>

<p>I still think the overall concept of downsampling high DPI buffers is the simplest, which gives two options:</p>

<ul class="remarkup-list">
<li class="remarkup-list-item">we grab the scratch at native resoltion, then explicitly make a second scratch texture at half the size which</li>
</ul>

<p>we render the first texture into.</p>

<ul class="remarkup-list">
<li class="remarkup-list-item">we blit the framebuffer as that allows us to do the transformation all in the same pass.</li>
</ul>

<p>GLRenderTarget::blit already has all the transformation code so it keeps the code super simple.</p>

<p>This patch does the latter.</p>

<p>It's faster than the extra pass, but has the obvious downside that not all hardware supports blitting, but<br />
realistically any hardware that supports 4k output will.<br />
The screenshot effect already relies on blit being supported, so I think it should be safe.<br />
(right?)</p></div></div><br /><div><strong>CHANGES SINCE LAST UPDATE</strong><div><a href="https://phabricator.kde.org/D4963?vs=12247&id=12710" rel="noreferrer">https://phabricator.kde.org/D4963?vs=12247&id=12710</a></div></div><br /><div><strong>BRANCH</strong><div><div>scaling_final</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D4963" rel="noreferrer">https://phabricator.kde.org/D4963</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>effects/blur/blur.cpp</div></div></div><br /><div><strong>To: </strong>davidedmundson, Plasma<br /><strong>Cc: </strong>fredrik, plasma-devel, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol<br /></div>