[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-panel-devel
Subject:    D4963: Add scaling support into BlurEffect::doBlur
From:       David Edmundson <noreply () phabricator ! kde ! org>
Date:       2017-03-22 23:23:31
Message-ID: 20170322232331.53272.14322.8C092E75 () phabricator ! kde ! org
[Download RAW message or body]

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


[Attachment #3 (text/html)]

<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&#039;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&#039;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&amp;id=12710" \
rel="noreferrer">https://phabricator.kde.org/D4963?vs=12247&amp;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>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic