Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation question #1

Closed
Umity opened this issue May 19, 2021 · 6 comments
Closed

Installation question #1

Umity opened this issue May 19, 2021 · 6 comments

Comments

@Umity
Copy link

Umity commented May 19, 2021

How can we install this? Can you please set up as swift package?

@YuAo
Copy link
Member

YuAo commented May 20, 2021

We do not currently have a SwiftPM setup for this repo. However you can just drag the source files to your project to use them.

You may want to change @"shadowHighlightAdjust" in

fragmentFunctionDescriptor:[[MTIFunctionDescriptor alloc] initWithName:@"shadowHighlightAdjust" libraryURL:MTIDefaultLibraryURLForBundle([NSBundle bundleForClass:self])]];

to @"metalpetalshadowhighlight::shadowHighlightAdjust" if your deployment target >= iOS 13.

See: MetalPetal/MetalPetal#206

@Umity
Copy link
Author

Umity commented May 20, 2021

if i drag them then #import getting error
<MetalPetal/MetalPetal.h> 'MetalPetal/MetalPetal.h' file not found in MTIHighlightShadowFilter.h file

@Umity
Copy link
Author

Umity commented May 20, 2021

i changed to #import <MetalPetal.h> and problem resolved but now i cant get the filter
let shadowhighFilter = MTIHighlightShadowFilter()
returning error, Cannot find 'MTIHighlightShadowFilter' in scope

@Umity
Copy link
Author

Umity commented May 20, 2021

OK, i thought xcode auto adding line
#import "MTIHighlightShadowFilter.h"
to my bridging header but i manually added instead and that seem sorted the problem.

@Umity Umity closed this as completed May 20, 2021
@YuAo
Copy link
Member

YuAo commented May 20, 2021

Also, I think it's quite easy to rewrite this filter in Swift. There are only ~40 lines of objective-c code.

@Umity
Copy link
Author

Umity commented May 20, 2021

Also, I think it's quite easy to rewrite this filter in Swift. There are only ~40 lines of objective-c code.

It could be great if you can.. I loved this filter, and it is much better approach then my highlights/shadows adjustments on rgbcurvetool.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants