deinterlace blend, ebook
[ Pobierz całość w formacie PDF ]
// (C) 2011 Jan-Willem Krans (janwillem32 <at> hotmail.com)// This file is part of Video pixel shader pack.// This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.// You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.// deinterlace (blend)// This shader should not be run as a screen space pixel shader.// If possible, avoid compiling with the software emulation modes (ps_?_sw). Pixel shaders require a lot of processing power to run in real-time software mode.// This shader is meant to work with linear RGB input and output. Regular R'G'B' with a video gamma encoding will have to be converted with the linear gamma shaders to work properly.// Use this shader only if deinterlacing by the video decoder or renderer completely fails on a video, else this shader will only lower the image quality.sampler s0;float2 c1 : register(c1);#define sp(a) tex2D(s0, tex+c1*float2(0, a))float4 main(float2 tex : TEXCOORD0) : COLOR{return (sp(0)*2+sp(-1)+sp(1))/4.;// blend the original pixel with the pixel above and below it, then output}
[ Pobierz całość w formacie PDF ]