Pages: 1 2
Author Topic: Shader Resources  (172,677 Views)
Offline (Unknown gender) Goombert

Developer
Joined: Jan 2013
Posts: 2,991
View profile
Posted on: August 27, 2013, 09:31:04 AM
Shaders are now available as a resource and can be used. They are compatible with Game Maker's and can currently only be saved and loaded under EGM, GMK does not support them. GMX format will be finished soon enough I have a lot on my plate.



Youtube Video: https://youtu.be/cZixbLHaroI

WARNING! You have to update in order to use them, and you must update both LateralGM, the plugin, and ENIGMA using git in order to use them, if you update only one of these then the others will break. If you have installed using the Windows ENIGMA Portable you are advised to redownload as bug fixes have been applied to those of you with MinGW issues and it also now contains an ini settings file to control checking for java and other things. Automatic updating will be available at a later point in time.

The shader functions are all documented and available on the Wiki.
https://enigma-dev.org/docs/Wiki/Shader_Functions

Currently only GLSL shaders are supported, but the function API is tailored for glsl programming and can currently only be used in OpenGL. The Game Maker version of the functions are simply wrapped around each graphics systems implementation so that there can exist an API which caters to only one shading language. These shaders can greatly help improve the performance of your games by offloading strenuous work onto the GPU where they properly belong, unlike Game Maker we also provide you the option to dynamically compile and link shaders at runtime as shaders are properly intended and encouraged by hardware manufacturers to be used.

There is a nice website for scripting and seeing real time results of shaders as well, they also have many example shaders.
http://www.kickjs.org/example/shader_editor/shader_editor.html#

There is the GLSL sandbox as well which I thought was very cool.
https://www.shadertoy.com/
Offline (Unknown gender) time-killer-games
Guest


Email
Reply #1 Posted on: August 27, 2013, 05:56:01 PM
Nice Robert! This is Epic! :-)
Offline (Unknown gender) TheExDeus

Developer
Joined: Apr 2008
Posts: 1,860
View profile
Reply #2 Posted on: August 27, 2013, 06:25:35 PM
Shaders still not working. Will investigate later. I think it was something with shader compilation error.
Offline (Unknown gender) polygone

Contributor
Joined: Mar 2009
Posts: 794
View profile
Reply #3 Posted on: August 27, 2013, 08:19:26 PM
Quote from: TheExDeus on August 27, 2013, 06:25:35 PM
Shaders still not working. Will investigate later. I think it was something with shader compilation error.
How do you know shaders aren't working? Have you got it compiling now?
Offline (Unknown gender) Goombert

Developer
Joined: Jan 2013
Posts: 2,991
View profile
Reply #4 Posted on: August 27, 2013, 09:30:05 PM
QuoteShaders still not working. Will investigate later. I think it was something with shader compilation error.
Harri, all you have to do is make sure you have the very latest shit and just open that EGM and run it.
Offline (Unknown gender) time-killer-games
Guest


Email
Reply #5 Posted on: August 28, 2013, 01:46:40 AM
just tried it. I have the latest version of ENIGMA, LGM, Java, and the compile graphics target was set to OpenGL 3.0 when I pressed the test run green arrow button after loading your hardware performance evaluator EGM file, the java runtime crashed thus dumping out of LGM and ENIGMA, which essentially prevents a me from both test run and compile my game. Until this bug is fixed, I have no use for shaders in LGM and ENIGMA. I hope this will addressed and solved soon, but no sweat, I know you guys *cough* (Robert) can handle this hands down. :-)
Offline (Unknown gender) Goombert

Developer
Joined: Jan 2013
Posts: 2,991
View profile
Reply #6 Posted on: August 28, 2013, 03:21:46 AM
TKG, can you try again with the latest zip that I just uploaded? If the error persists please provide your output_log.txt
Offline (Unknown gender) time-killer-games
Guest


Email
Reply #7 Posted on: August 28, 2013, 03:56:19 PM
Nope, still not working...

output_log.txt
Offline (Unknown gender) time-killer-games
Guest


Email
Reply #8 Posted on: August 28, 2013, 07:41:08 PM
That's strange, I thought I already updated the engine because I saw a new blue CMD window but I redownloaded it and it now works! Hazzah! Thanks Robert!!! :D
Offline (Unknown gender) Goombert

Developer
Joined: Jan 2013
Posts: 2,991
View profile
Reply #9 Posted on: August 29, 2013, 12:58:30 AM
Yep, see, I don't know, you guys are not listening when I keep telling you to redownload 50 times XD
Offline (Unknown gender) time-killer-games
Guest


Email
Reply #10 Posted on: August 30, 2013, 04:53:26 PM
Would it be possible to convert a gmk, which doesn't support shaders into an egm that does support shaders? I think it would be nice to have such a feature.
Offline (Unknown gender) Goombert

Developer
Joined: Jan 2013
Posts: 2,991
View profile
Reply #11 Posted on: September 01, 2013, 10:41:54 AM
Yes, this should be possible now TKG after the bugs I just fixed this morning, get the new JARs from the LGM topic and patch it yourself or just redownload the portable ZIP.  (Y) Also, go to File->Preferences and set your theme to native and restart, I can't stand looking at the default Swing theme.

@Harri, give me a day or two and I am going to hook up the shader compiler to output the feedback in LGM's progress window and to the console or output log as Josh has advised me to do.
Offline (Unknown gender) time-killer-games
Guest


Email
Reply #12 Posted on: September 01, 2013, 01:39:16 PM
Glad to hear it dang you guys are quick at this stuff.
Offline (Unknown gender) time-killer-games
Guest


Email
Reply #13 Posted on: September 01, 2013, 05:32:30 PM
How do I do it? I opened the gmk/gm81, exported the egm, opened the egm and still no shader resource folder...
Offline (Unknown gender) Goombert

Developer
Joined: Jan 2013
Posts: 2,991
View profile
Reply #14 Posted on: September 01, 2013, 06:29:52 PM
Hold on, I am working on it, my fix did not solve the GMK problem, give me a little while.
Pages: 1 2