BradLarson / GPUImage

An open source iOS framework for GPU-based image and video processing
http://www.sunsetlakesoftware.com/2012/02/12/introducing-gpuimage-framework
BSD 3-Clause "New" or "Revised" License
20.23k stars 4.61k forks source link

Bug exist in GPUImageGaussianBlurFilter? #2305

Closed Shun87 closed 8 years ago

Shun87 commented 8 years ago

Hello, When I run FilterShowcase demo, I made a change to the newFrameReadyAtTime function of GPUImageFilter class like this, change all value in imageVertices from 1.0 to 0.5: static const GLfloat imageVertices[] = { -0.5f, -0.5f, 0.5f, -0.5f, -0.5f, 0.5f, 0.5f, 0.5f, }; The result texture rendered on screen in gaussianBlur demo was 1/4 size of view port, I think it should be 1/2, what's wrong? Other filter works well, for example gray scale.

BradLarson commented 8 years ago

You reduced the range in X and Y from -1.0 - 1.0 to -0.5 - 0.5. That halves the size in both dimensions, leading to an image that is one-quarter the size of the original image.

Shun87 commented 8 years ago

@BradLarson Sorry, but the result x or y is only 0.25, not 0.5, the image is 1/16 the size of the original image. So I think there must be something wrong, you can have a try.