Skip to content

Commit

Permalink
Merge pull request BradLarson#456 from jagbolanos/master
Browse files Browse the repository at this point in the history
The GrayscaleFilter wasn't respecting the alpha channel
  • Loading branch information
BradLarson committed Sep 5, 2012
2 parents fa8ea2f + 363bd5d commit 4504196
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions framework/Source/GPUImageGrayscaleFilter.m
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ @implementation GPUImageGrayscaleFilter

void main()
{
float luminance = dot(texture2D(inputImageTexture, textureCoordinate).rgb, W);
lowp vec4 textureColor = texture2D(inputImageTexture, textureCoordinate);
float luminance = dot(textureColor.rgb, W);

gl_FragColor = vec4(vec3(luminance), 1.0);
gl_FragColor = vec4(vec3(luminance), textureColor.a);
}
);

Expand Down
2 changes: 1 addition & 1 deletion framework/Source/GPUImageMotionDetector.m
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ void main()

@implementation GPUImageMotionDetector

@synthesize lowPassFilterStrength;
@synthesize lowPassFilterStrength, motionDetectionBlock;

#pragma mark -
#pragma mark Initialization and teardown
Expand Down

0 comments on commit 4504196

Please sign in to comment.