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 / Shaders, shaders, shaders...

Author
Message
Naphier
13
Years of Service
User Offline
Joined: 2nd Oct 2010
Location: St Petersburg, Florida
Posted: 29th Oct 2014 02:57
So I decided to toy with shaders a little bit and found Paul's simple example here:
http://forum.thegamecreators.com/?m=forum_view&t=209365&b=41

However, with v2 on Android broadcasting to the player I get a message with a ton of errors saying that there are integer and float variables with the operand '*' and they are incompatible...

Anyone have sprite shaders working on v2 android yet?

Markus
Valued Member
19
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 29th Oct 2014 08:35
i read in v2 alpha anywhere:

"Changed default shader version on Windows to GLSL 110 to support OpenGL 2.0 cards such as old Intel integrated graphics"
"Is GLSL version 1.2 still supported? If yes, do we have to set #version 120 on top of a script if we want to use version 1.2?"

Quote: "- Added support for using "#version <versionnum>" at the beginning of Windows shaders to allow higher versions"

maybe u need cast integer to float, i believe it was =float(var)
or u forget the dot at values. 10 * = 10.0 *

AGK 108 (B)19 + AppGameKit V2 Alpha .. : Windows 8.1 Pro 64 Bit : AMD Radeon R7 265 : Mac mini OS X 10.10 (Yosemite)
Naphier
13
Years of Service
User Offline
Joined: 2nd Oct 2010
Location: St Petersburg, Florida
Posted: 29th Oct 2014 08:49
Hey that was it! There were some numbers without .0 behind them!
Unfortunately the shader performance is really bad.
Very choppy and they appear to stop going after a little while.
Such simple shaders shouldn't be an issue for my Nexus 5.

And I've not updated to the newest alpha yet so the #version isn't accepted.
But it runs OpenGL ES 3.0 so downgrading shouldn't help... shouldn't.

MikeHart
AGK Bronze Backer
20
Years of Service
User Offline
Joined: 9th Jun 2003
Location:
Posted: 29th Oct 2014 13:44
So far I had no luck getting shaders to work. I would love to see a simple tutorial for AGK2. SpriteShader and FullscreenShader.
lilpissywilly
AGK Developer
13
Years of Service
User Offline
Joined: 10th Sep 2010
Location: Office Chair
Posted: 29th Oct 2014 14:29 Edited at: 29th Oct 2014 14:29
Seek and ye shall find: http://forum.thegamecreators.com/?m=forum_view&t=211491&b=41

A few posts down I post very basic sprite shaders without any fluff. I believe these would be a good starting point.

We do need some more information on what keywords AppGameKit uses, but you can essentially follow any GLSL tutorial with a bit of jiggerypokery.

Any questions, I\'ll try and help. I have fiddled with this more than the average AppGameKit user I guess, surprisingly.

@MikeHart: The example for full screen shader that comes with AGKv2 is quite well annotated. I\'ve got an example of that too if you would like.

My hovercraft is full of eels
MikeHart
AGK Bronze Backer
20
Years of Service
User Offline
Joined: 9th Jun 2003
Location:
Posted: 29th Oct 2014 16:46
Thanks, i tried to adapt that example but so far no success. Will post my code when i have access to a comp.
BatVink
Moderator
20
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 29th Oct 2014 22:20
I'm still keen to get a reflection shader, if that's the right term. I'm wanting a shiny tiled floor that reflects the objects placed on it. I know in FPSC they do it by creating water with zero height and no ripples. However, that doesn't help me with no knowledge of shaders.

Quidquid latine dictum sit, altum sonatur
Naphier
13
Years of Service
User Offline
Joined: 2nd Oct 2010
Location: St Petersburg, Florida
Posted: 30th Oct 2014 03:17
I'd love to see more shader examples, there were a few in that thread. I've also no clue what I'm doin gwith them. Seems like they could be really handy and when I've used them in Unity they are. Also I'd love to know if anyone has seen really poor performance of the shaders on Android. I saw a video from AppGameKit a while back showing shaders on sprites on Android and they looked great, so maybe that example I used just isn't good? It seems so simple that it should be OK, though!

Login to post a reply

Server time is: 2024-03-29 01:07:25
Your offset time is: 2024-03-29 01:07:25