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 / Version 2 release - Shader not loading

Author
Message
nz0
AGK Developer
17
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 28th Nov 2014 21:54
What version do we refer to for this (the steam release) ?

Where do I report bugs now for this?

Converting my old v2 program I get pixel shader fails to compile - OpenGL first class arrays require version #120

I don't have "#version 120" in the file as AppGameKit is supposed to add it?

Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 1st Dec 2014 17:13 Edited at: 1st Dec 2014 17:13
AGK currently defaults to "#version 110" to support OpenGL 2.0 devices like old integrated Intel graphics. You can use

at the start of your shader to increase the support to OpenGL 2.1 devices and above. Note that some mobile devices might not support first class arrays (defining array values outside a function) either, I've noticed this error on some Android devices. Best bet is to define the array values as uniforms and set them from AGK.
nz0
AGK Developer
17
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 2nd Dec 2014 02:58
What about the help files saying don't add versions, as version #120 is added automatically?

Strange, as the same shaders work in your bloom example, but not like-for-like when I use them. (give this error)

Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 2nd Dec 2014 03:45
I've modified the help files. In the bloom example I used #110 and initialised the arrays inside the function which is allowed, but probably not very efficient.

Login to post a reply

Server time is: 2024-11-25 11:24:11
Your offset time is: 2024-11-25 11:24:11