Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>If you have OpenGL 3.0 or alternatively <code>EXT_framebuffer_blit</code> available (very likely -- all nVidia cards since around 2005, all ATI cards since around 2008 have it, and even Intel HD graphics claims to support it), then you can <a href="http://www.opengl.org/sdk/docs/man3/xhtml/glBlitFramebuffer.xml" rel="nofollow"><code>glBlitFramebuffer[EXT]</code></a> into a smaller framebuffer (with a respectively smaller rectangle) and have the graphics card do the work.<br> Note that you cannot ever safely rescale inside the same frambuffer even if you were to say "I don't need the original", because overlapped blits are undefined (<em>allowed</em>, but undefined).</p> <p>Or,you can of course just draw a fullscreen quad with a simple downscaling pixel shader (<a href="http://http.download.nvidia.com/developer/SDK/Individual_Samples/DEMOS/Direct3D9/src/AnisoDecimation/docs/AnisoDecimation.pdf" rel="nofollow">aniso decimation</a>, if you want).</p> <p>In fact, since you mention stencil in your last paragraph... if it is <em>stencil</em> (or depth) that you want to rescale, then you most definitively want to draw a fullscreen quad with a shader, because it will very likely not give the desired result otherwise. Usually, one will choose a <code>max</code> filter rather than interpolation in such a case (e.g. what reasonable, meaningful result could interpolating a stencil value of 0 and a value of 10 give -- something else is needed, such as "any nonzero" or "max value in sample area").</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload