SceneKit, CIFilter. CICategoryBlur filters nothing visible

。_饼干妹妹 提交于 2019-11-30 17:11:35

问题


I'm trying to blur a node or create a blur effect in SceneKit.

    let ship = scene.rootNode.childNodeWithName("ship", recursively: true)!

    var ciFilters = [CIFilter]()
    ciFilters.append(CIFilter(name: "CIGaussianBlur", withInputParameters: [kCIInputRadiusKey: 30])!)

    ship.filters = ciFilters

Results in:

Which, I thought ok maybe I'm using the CIFilter incorrectly. However CIHalftone works fine:

        ciFilters.append(CIFilter(name: "CICMYKHalftone", withInputParameters: ["inputWidth": 20])!)

I've also tried with CIZoomBlur also doesn't work, however CIPixellate does.

Am I missing something fundamental here?

Update: I have tried everything in CICategoryBlur and can't get any of them to work, however every other CICategory item i've tried I could get to work.

Thanks.

来源:https://stackoverflow.com/questions/34210293/scenekit-cifilter-cicategoryblur-filters-nothing-visible

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!