objective-c - SpriteKit Liquid Threshold Filter Effect
问题描述
I want to create a liquid effect in SpriteKit with Objective-C. At First I created a white blurred ball texture for the SKSpriteNode. Currently I am using the CIFilter "CIColorPosterize" as filter for the Threshold effect.
CIFilter *filter = [CIFilter filterWithName:@"CIColorPosterize"];
[filter setValue:@(2.0) forKey:@"inputLevels"];
[self.scene setFilter:filter];
[self.scene setShouldEnableEffects:YES];
And it looks okay: Like This
But now I want to change the color of the balls with the colorBlendFactor.
ball.color = [UIColor orangeColor];
ball.colorBlendFactor = 1.0;
This looks not correctly for me because the CIFilter manipulates also the blend color, but without filter I haven't the Threshold effect.
Now my question: Is there a way to have the Threshold effect without changing the color?
解决方案
推荐阅读
- c++ - 将数字转换为字母并将数字与自身相乘
- arduino - ESP32-WROOM-32 PWD 带毫秒
- python - 如何从 Azure SDK DefaultCredential 获取不记名令牌
- reactjs - 刷新令牌在反应本机导致重定向到登录屏幕三次(登录屏幕闪烁)
- spring - 具有多个数据库的 Spring JPA 单元测试
- jmeter - 如何创建正确的 JMeter 工作负载模型
- css - CSS 基础:在 CSS 中为表单字段 ID 添加标签
- html - 更改标题的位置,还添加一个过渡
- node.js - 使用 Google 服务帐户(目录 API)列出所有现有日历资源
- javascript - 巴比伦。当我用指针移动相机时鼠标位置不会改变