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 / AGK Object Shader Code

Author
Message
OminusPrime
9
Years of Service
User Offline
Joined: 30th Jun 2015
Location:
Posted: 26th Mar 2016 21:10 Edited at: 26th Mar 2016 22:54
Hi Ive been Experimenting for the past couple weeks with 2DSprite Shader's and now want to try 3DObject Shader's
I used a similar approach to sprites but with Objects instead, but not getting any shaders working.
Is this the correct method??

The shaders are not written by me they are from Cliff Mellangard and his great tutorial on shaders.
unfortunately im finding lots of shaders but no AppGameKit implementation code

AGK Code Used in my Experiments





VERTEX Shader




Pixel/Fragment Shader



Thnks Any help Would be great.
Zwarteziel
13
Years of Service
User Offline
Joined: 22nd Jan 2011
Location: Netherlands
Posted: 27th Mar 2016 19:55
Hey OminusPrime,

there has been a change where all references to agk_ObjColor need to be replaced by agk_MeshDiffuse. Cliff's shaders where all made before AGK2 v2.0.15 was released, so they won't work without altering the code. Good luck!
OminusPrime
9
Years of Service
User Offline
Joined: 30th Jun 2015
Location:
Posted: 29th Mar 2016 23:43
Thanks Zerotown.

I was wondering if TGC have posted any information regarding the interface AppGameKit has with Shaders, like agk_World agk_View etc. I found one list but as you say agk_ObjColor has been changed. has anything else changed is there an up to date list.
also as i work to convert shaders I find a lot asking for the model matrix , how do i get that???

Thanks Again
Ominusprime

Login to post a reply

Server time is: 2024-09-29 13:28:28
Your offset time is: 2024-09-29 13:28:28