corona icon indicating copy to clipboard operation
corona copied to clipboard

iOS - object.fill.effect = "filter.hue" doesn't work anymore

Open Colin-Morgan opened this issue 10 months ago • 8 comments

Because of Apple's upcoming deprecation of the iOS 17 SDK, I've made the jump from Solar2D 3699 building with Xcode 15.0.1 to Solar2D 3718 building with 16.2. Everything builds fine, but when I test my app, object.fill.effect = "filter.hue" doesn't seem to be working any more.

The image below demonstrates the difference between builds made with Solar2D 3699 and 3718.

Image

Colin-Morgan avatar Apr 07 '25 12:04 Colin-Morgan

Worth noting, since this is a graphics issue, that both builds are non-Metal.

Colin-Morgan avatar Apr 07 '25 14:04 Colin-Morgan

Are you seeing this only in iOS or is it a general problem? Does it go away pre-3717?

If so I must have stepped on something. Looking at some of the relevant stuff right now but might take some digging.

ggcrunchy avatar Apr 07 '25 20:04 ggcrunchy

Are you seeing this only in iOS or is it a general problem? Does it go away pre-3717?

If so I must have stepped on something. Looking at some of the relevant stuff right now but might take some digging.

It still works fine on android/window/html5.

kan6868 avatar Apr 07 '25 23:04 kan6868

If I switch back to 3699, everything works fine. I'm having trouble building with 3713, so I can't say if the problem started in Xcode 16.1.

Colin-Morgan avatar Apr 08 '25 05:04 Colin-Morgan

Good news! I finally got Xcode 16.1 working, and I can confirm that in Solar2D build 3712 the shaders do work correctly, but in Solar2D 3713 (also Xcode 16.1) they don't work. So, it looks like whatever broke object.fill.effect = "filter.hue" happened in Solar2D build 3713. (Not to jump to conclusions, but there was something called the "experimental branch" that was merged with main in that update.) If anyone needs a minimum viable project to test against, please let me know.

Colin-Morgan avatar Apr 08 '25 13:04 Colin-Morgan

If there are no error logs, I suspect something is preventing the macro FRAGMENT_SHADER_SUPPORTS_HIGHP from working.

Image

kan6868 avatar Apr 08 '25 13:04 kan6868

I just reinstalled one of the non-functioning builds and took a look in Console- nothing shows up. I can see the exact moment it's drawing the highlights, and it looks like the shader is failing silently.

Colin-Morgan avatar Apr 08 '25 14:04 Colin-Morgan

The iOS incorrectly detects that HIGHP is not supported. When forcibly enabled during debugging, it works fine. I'm not sure how to correct the detection. Is there any progress on this? @ggcrunchy Thanks.

You can reproduce it using https://github.com/coronalabs/samples-coronasdk/tree/master/Graphics/GeneratorViewer, there are differences in the generator on the iOS platform before and after the 3713 rendering changes:

  1. generator.lenticularHalo
  2. generator.perlinNoise
  3. generator.random
  4. generator.sunbeams
Image Image Image Image

clang-clang-clang avatar Nov 11 '25 08:11 clang-clang-clang