Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

iOS and MacOS / [SOLVED] Shaders on iOS, anything I should be aware of?

Author
Message
PHeMoX
7
Years of Service
User Offline
Joined: 9th Jan 2018
Location:
Posted: 25th Nov 2024 09:19
For some reason my shader that is based on the waterdrop ripple shader (https://forum.thegamecreators.com/thread/215563) that can be found in this forum, won't run on iPhone (iPhone 13, iPhone SE (8?) tested, both fail). It runs on Android, Windows and OSX just fine. Obviously there's something in the shader that won't initialize on iOS. Perhaps one of you has run into the same issue of trying to get shaders to run on iOS?

It won't be the end of the world, as I need to implement a fallback solution anyway for older phones. But for the water ripple shader really being so basic, I don't really understand why it won't run.

Any experiences with iOS and shaders?

The author of this post has marked a post as an answer.

Go to answer

PHeMoX
7
Years of Service
User Offline
Joined: 9th Jan 2018
Location:
Posted: 19th Dec 2024 13:22
No one who uses shaders on iOS??
Qube_
10
Years of Service
User Offline
Joined: 21st Oct 2014
Location: Omnipresent
Posted: 22nd Dec 2024 01:11
This post has been marked by the post author as the answer.
Works OK here on iPhone 14 Pro Max with iOS 18.

Does it give you any specific error?. No idea if this will help but have you tried changing "#version 120" to "#version 110" in the .ps shader file?
PHeMoX
7
Years of Service
User Offline
Joined: 9th Jan 2018
Location:
Posted: 22nd Dec 2024 09:50
Thank you so much Qube_ , this indeed fixed the problem. I initially uncommented the version number, but with #version 110 it works now. Much appreciated! Can't believe I didn't think of changing that to something lower. I wonder what the default version number is when I don't force anything.
Qube_
10
Years of Service
User Offline
Joined: 21st Oct 2014
Location: Omnipresent
Posted: 22nd Dec 2024 20:00
AGK uses 1.10 but I was thinking when I saw your code that the "#ifdef GL_ES" was being used and it was then saying 1.20. Even though it worked on my iPhone I guessed no harm in trying to set it to what AppGameKit says it is happy with.

Glad it worked

Login to post a reply

Server time is: 2025-05-13 02:14:19
Your offset time is: 2025-05-13 02:14:19