From cdddaeaff2597b3db8c164db158d74a8e5fa6572 Mon Sep 17 00:00:00 2001 From: Brad Larson Date: Wed, 5 Sep 2012 19:13:20 -0500 Subject: [PATCH] Added normal blend to the FilterShowcase, although it doesn't really show much with an opaque input image. --- .../FilterShowcase/ShowcaseFilterListController.m | 1 + .../FilterShowcase/ShowcaseFilterViewController.h | 1 + .../FilterShowcase/ShowcaseFilterViewController.m | 9 +++++++++ framework/Source/GPUImageNormalBlendFilter.h | 5 ----- framework/Source/GPUImageNormalBlendFilter.m | 6 ------ 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/examples/FilterShowcase/FilterShowcase/ShowcaseFilterListController.m b/examples/FilterShowcase/FilterShowcase/ShowcaseFilterListController.m index ecaa88528..252ef9fd6 100755 --- a/examples/FilterShowcase/FilterShowcase/ShowcaseFilterListController.m +++ b/examples/FilterShowcase/FilterShowcase/ShowcaseFilterListController.m @@ -154,6 +154,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N case GPUIMAGE_SUBTRACTBLEND: cell.textLabel.text = @"Subtract blend"; break; case GPUIMAGE_HARDLIGHTBLEND: cell.textLabel.text = @"Hard light blend"; break; case GPUIMAGE_SOFTLIGHTBLEND: cell.textLabel.text = @"Soft light blend"; break; + case GPUIMAGE_NORMALBLEND: cell.textLabel.text = @"Normal blend"; break; case GPUIMAGE_OPACITY: cell.textLabel.text = @"Opacity adjustment"; break; case GPUIMAGE_KUWAHARA: cell.textLabel.text = @"Kuwahara"; break; case GPUIMAGE_VIGNETTE: cell.textLabel.text = @"Vignette"; break; diff --git a/examples/FilterShowcase/FilterShowcase/ShowcaseFilterViewController.h b/examples/FilterShowcase/FilterShowcase/ShowcaseFilterViewController.h index 218b521ca..79ae7075d 100755 --- a/examples/FilterShowcase/FilterShowcase/ShowcaseFilterViewController.h +++ b/examples/FilterShowcase/FilterShowcase/ShowcaseFilterViewController.h @@ -95,6 +95,7 @@ typedef enum { GPUIMAGE_EXCLUSIONBLEND, GPUIMAGE_HARDLIGHTBLEND, GPUIMAGE_SOFTLIGHTBLEND, + GPUIMAGE_NORMALBLEND, GPUIMAGE_OPACITY, GPUIMAGE_CUSTOM, GPUIMAGE_UIELEMENT, diff --git a/examples/FilterShowcase/FilterShowcase/ShowcaseFilterViewController.m b/examples/FilterShowcase/FilterShowcase/ShowcaseFilterViewController.m index c0ae94c31..b3b3264a8 100755 --- a/examples/FilterShowcase/FilterShowcase/ShowcaseFilterViewController.m +++ b/examples/FilterShowcase/FilterShowcase/ShowcaseFilterViewController.m @@ -947,6 +947,15 @@ - (void)setupFilter; filter = [[GPUImageSoftLightBlendFilter alloc] init]; }; break; + case GPUIMAGE_NORMALBLEND: + { + self.title = @"Normal Blend"; + self.filterSettingsSlider.hidden = YES; + needsSecondImage = YES; + + filter = [[GPUImageNormalBlendFilter alloc] init]; + }; break; + case GPUIMAGE_OPACITY: { self.title = @"Opacity Adjustment"; diff --git a/framework/Source/GPUImageNormalBlendFilter.h b/framework/Source/GPUImageNormalBlendFilter.h index 9cf04a314..ce5e22b49 100644 --- a/framework/Source/GPUImageNormalBlendFilter.h +++ b/framework/Source/GPUImageNormalBlendFilter.h @@ -1,9 +1,4 @@ -// -// GPUNormalBlendFilter.h -// GPUImage -// // Created by Jorge Garcia on 9/5/12. -// Copyright (c) 2012 Brad Larson. All rights reserved. // #import "GPUImageTwoInputFilter.h" diff --git a/framework/Source/GPUImageNormalBlendFilter.m b/framework/Source/GPUImageNormalBlendFilter.m index a1a8e87b5..b6aceefc9 100644 --- a/framework/Source/GPUImageNormalBlendFilter.m +++ b/framework/Source/GPUImageNormalBlendFilter.m @@ -1,10 +1,4 @@ -// -// GPUNormalBlendFilter.m -// GPUImage -// // Created by Jorge Garcia on 9/5/12. -// Copyright (c) 2012 Brad Larson. All rights reserved. -// #import "GPUImageNormalBlendFilter.h" /*