Boxer icon indicating copy to clipboard operation
Boxer copied to clipboard

Update Vendor/OpenEmuShaders

Open getaaron opened this issue 1 year ago • 3 comments

This PR updates OpenEmuShaders. The main benefit to Boxer is to pull in https://github.com/OpenEmu/OpenEmu-Shaders/commit/286f95150a41ad150c0b581c283fbe2f2fb929a2 which will allow it to build on modern homebrew installations by specifying the /opt/homebrew path in addition to the legacy /usr/local path.

Closes #54

getaaron avatar Oct 07 '23 00:10 getaaron

There is a reason I haven't updated OpenEmuShaders yet: source code in Boxer will also need to be updated.

MaddTheSane avatar Oct 07 '23 00:10 MaddTheSane

@MaddTheSane If you feel like giving me some general direction I can take a pass at it.

I see these two:

/Users/runner/work/Boxer/Boxer/Boxer/Shaders/BXShadersModel+OpenEmu.swift:40:17: error: method cannot be marked @objc because the type of the parameter 1 cannot be represented in Objective-C
    public func write(parameters params: [ShaderParameter], identifier: String) {
                ^

It looks like ShaderParameter is no longer an NSObject subclass.

/Users/runner/work/Boxer/Boxer/Boxer/Shaders/BXShadersModel+OpenEmu.swift:43:37: error: value of type 'ShaderParameter' has no member 'value'
        for p in params.filter({ $0.value != $0.initial }) {
                                 ~~ ^~~~~

It looks like ShaderParameter is no longer has a value.

Have you explored it more? Are there other fixes you know of that will be needed?

getaaron avatar Oct 07 '23 01:10 getaaron

It also looks like Objective-C binding for the Swift class FilterChain (represented as the ObjC symbol OEFilterChain) were removed. Same thing with ShaderParameter and OEShaderParameter. There's also the removal of the OEShaderParamGroup class.

@stuartcarnie was the one that really made the Metal back-end work, including the custom shaders. I'll probably talk to him tomorrow.

MaddTheSane avatar Oct 07 '23 09:10 MaddTheSane