Permalink
Browse files

Fix zooming with the separated convolution shader

  • Loading branch information...
1 parent 55a903c commit d53cb41cc207a9f08bfab4a44b1054eaafea7d18 @CrystalP CrystalP committed Oct 4, 2011
Showing with 6 additions and 1 deletion.
  1. +6 −1 xbmc/cores/VideoRenderers/VideoShaders/WinVideoFilter.cpp
@@ -28,7 +28,7 @@
#include <map>
#include "ConvolutionKernels.h"
#include "YUV2RGBShader.h"
-
+#include "../WinRenderer.h"
CYUV2RGBMatrix::CYUV2RGBMatrix()
{
@@ -733,6 +733,11 @@ void CConvolutionShaderSeparable::PrepareParameters(unsigned int sourceWidth, un
CUSTOMVERTEX* v;
CWinShader::LockVertexBuffer((void**)&v);
+ // Alter rectangles the destination rectangle exceeds the intermediate target width when zooming and causes artifacts.
+ // Work on the parameters rather than the members to avoid disturbing the parameter change detection the next time the function is called
+ CRect tgtRect(0, 0, destWidth, destHeight);
+ CWinRenderer::CropSource(sourceRect, destRect, tgtRect);
+
// Manipulate the coordinates to work only on the active parts of the textures,
// and therefore avoid the need to clear surfaces/render targets

0 comments on commit d53cb41

Please sign in to comment.