Comments (3)
Yes, it is. Make sure you are targeting an actual device or the Generic iOS Device build target. Metal is not supported in the iOS Simulator, and you have to use the camera for most of our current examples, so this needs to be run on a device.
Alternatively, you can try out the Mac FilterShowcase and other sample applications, which will run natively on your Mac, to get an idea of how this works. Almost all code is shared between iOS and Mac targets for the framework.
from gpuimage3.
Im getting an exception when I attempt to launch the Mac filter show case app:
[MTLRenderPipelineDescriptorInternal setRasterSampleCount:]: unrecognized selector sent to instance 0x600000199d90
Seems to be happening line 56 of the MTLCommandBuffer file of the linked gpuimage framework because it can't recognize this property. Any thoughts off the top of your head why? (I'm just returning to your repos after a few years and am combing through your work in Swift. Very nice)
Temporarily removing the line from the packaged framework seems to work fine at first glance.
func generateRenderPipelineState(device:MetalRenderingDevice, vertexFunctionName:String, fragmentFunctionName:String, operationName:String) -> MTLRenderPipelineState {
guard let vertexFunction = device.shaderLibrary.makeFunction(name: vertexFunctionName) else {
fatalError("\(operationName): could not compile vertex function \(vertexFunctionName)")
}
guard let fragmentFunction = device.shaderLibrary.makeFunction(name: fragmentFunctionName) else {
fatalError("\(operationName): could not compile fragment function \(fragmentFunctionName)")
}
let descriptor = MTLRenderPipelineDescriptor()
descriptor.colorAttachments[0].pixelFormat = MTLPixelFormat.bgra8Unorm
**descriptor.rasterSampleCount = 1**
descriptor.vertexFunction = vertexFunction
descriptor.fragmentFunction = fragmentFunction
do {
return try device.device.makeRenderPipelineState(descriptor: descriptor)
} catch {
fatalError("Could not create render pipeline state for vertex:\(vertexFunctionName), fragment:\(fragmentFunctionName), error:\(error)")
}
}
from gpuimage3.
@hggz - That's weird. What OS and Xcode version are you seeing this with?
We originally had sampleCount there instead of rasterSampleCount, but the header noted that the former had been deprecated in favor of the latter. However, it didn't have a hard deprecation notice on it yet, and that might not exist prior to High Sierra. I should be getting a warning about that, due to the older deployment target, but I don't think it was denoted with the proper availability markings.
Try switching rasterSampleCount to sampleCount and see if this works. If so, I'll swap it back in the code.
from gpuimage3.
Related Issues (20)
- Xcode 12 - Camera.swift not building HOT 2
- How to implement face beauty filter using GPUImage3
- Chroma Key HOT 1
- Will you support Mac Catalyst? HOT 1
- Parse Adobe .cube file into data
- Is this project alive?
- animation supported?
- fatalError on trying to edit screenshot images
- Fatal error: Unexpectedly found nil while unwrapping an Optional value HOT 1
- There is no 'sharpen'
- Fatal error: Failed loading image texture at PictureInput.swift HOT 2
- how to use renderview render original uiimage HOT 4
- SimpleVideoRecorder Get black video in iMac BUT normal in macbook
- Reinterpretation of vibrance?
- Support dynamic overlay view
- LookupFilter for image save is not working
- Interpolation Methods for Image Scaling
- Audio Not working and if we add audio code from gpuimage2 it getting crashed
- Dilation support
- DEAD PROJECT
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gpuimage3.