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.

AppGameKit Classic Chat / 2.0.19 Shader extension problems

Author
Message
Preben
AGK Studio Developer
20
Years of Service
User Offline
Joined: 30th Jun 2004
Location:
Posted: 17th Jun 2016 10:37
I have a problem enabling a shader extension.

i have this as the first line in my shader:
#extension GL_OES_standard_derivatives : enable

But on iPad2 , iPad Air, Android it generate an error: #extension must always be before any non-preprocessor tokens
The shaders do work and the extension is enabled, it just gives this error before it start.

( works without the error on windows and mac ).

I guess AppGameKit add something as the first lines in the shaders , would it be possible to add a line to the shaders as the very first line , before AppGameKit insert anything ?
best regards Preben Eriksen,
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 17th Jun 2016 16:27
AGK adds the line
to the vertex and pixel shaders before compiling on mobile devices. You could add this yourself by using
to selectively add the precision line, so the same shader will still work on all platforms. So for the next version I'll make AppGameKit check for the string "#if" and if found then it will assume you know what you are doing and it won't add the precision line itself.

Login to post a reply

Server time is: 2024-11-25 06:51:37
Your offset time is: 2024-11-25 06:51:37