ENIGMA Forums

General fluff => Announcements => Topic started by: Goombert on August 27, 2013, 04:31:04 AM

Title: Shader Resources
Post by: Goombert on August 27, 2013, 04: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.

(https://i.imgur.com/AJneWdE.png)

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.

The new cubes demonstration can be downloaded here, the one on the EDC is currently out of date and will not run. You should run the demo in OpenGL 3 graphics system.
Size: 8.19 MB's
https://www.dropbox.com/s/3ogjo87gzypirsk/perftester.egm

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.
http://glsl.heroku.com/
Title: Re: Shader Resources
Post by: time-killer-games on August 27, 2013, 12:56:01 PM
Nice Robert! This is Epic! :-)
Title: Re: Shader Resources
Post by: TheExDeus on August 27, 2013, 01:25:35 PM
Shaders still not working. Will investigate later. I think it was something with shader compilation error.
Title: Re: Shader Resources
Post by: polygone on August 27, 2013, 03:19:26 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?
Title: Re: Shader Resources
Post by: Goombert on August 27, 2013, 04:30:05 PM
Quote
Shaders 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.
Title: Re: Shader Resources
Post by: time-killer-games on August 27, 2013, 08:46:40 PM
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. :-)
Title: Re: Shader Resources
Post by: Goombert on August 27, 2013, 10:21:46 PM
TKG, can you try again with the latest zip that I just uploaded? If the error persists please provide your output_log.txt
Title: Re: Shader Resources
Post by: time-killer-games on August 28, 2013, 10:56:19 AM
Nope, still not working...
(https://dl.dropboxusercontent.com/u/79893663/LGMERROR2.png)
output_log.txt (https://dl.dropboxusercontent.com/u/79893663/output_log.txt)
Title: Re: Shader Resources
Post by: Goombert on August 28, 2013, 12:55:32 PM
@TKG, whatever you are doing you are not on the latest version of ENIGMA, did you get the zip or did you just update LGM's jar file? You need to update using git or just reextract the new ZIP, I can tell you have the new LGM but old engine because if it were the new engine it would have outputted something similar too...
Quote
Copying script names

Copying shader names [5]  <------------ Ya thats not in your output window
Title: Re: Shader Resources
Post by: time-killer-games on August 28, 2013, 02: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
Title: Re: Shader Resources
Post by: Goombert on August 28, 2013, 07:58:30 PM
Yep, see, I don't know, you guys are not listening when I keep telling you to redownload 50 times XD
Title: Re: Shader Resources
Post by: time-killer-games on August 30, 2013, 11:53:26 AM
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.
Title: Re: Shader Resources
Post by: Goombert on September 01, 2013, 05: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.
Title: Re: Shader Resources
Post by: time-killer-games on September 01, 2013, 08:39:16 AM
Glad to hear it dang you guys are quick at this stuff.
Title: Re: Shader Resources
Post by: time-killer-games on September 01, 2013, 12: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...
Title: Re: Shader Resources
Post by: Goombert on September 01, 2013, 01:29:52 PM
Hold on, I am working on it, my fix did not solve the GMK problem, give me a little while.
Title: Re: Shader Resources
Post by: cheeseboy on September 01, 2013, 09:01:08 PM
You're an idiot stop implemting shit you know nothing about then procceed to die and burn in hell.
Title: Re: Shader Resources
Post by: time-killer-games on September 01, 2013, 09:13:15 PM
Cheese boy's panties are in a bunch. O_o
Title: Re: Shader Resources
Post by: DaSpirit on September 01, 2013, 09:18:22 PM
Common occurrence in IRC.
Title: Re: Shader Resources
Post by: Goombert on September 02, 2013, 04:12:17 PM
@cheeseboy and TKG and everyone

Alright guys, after spending all night last night and this morning I was finally able to resolve the mutual exclusion issue in the plugin, it was a real doozy of a bug. Go ahead and get the new LGM jars from the LGM topic, I am uploading the patched portable zip now I had it taken down to make sure nobody came a long and downloaded the bugged version.

You can all thank TGMG, it is nice to have him back with the project.
Title: Re: Shader Resources
Post by: time-killer-games on September 02, 2013, 06:04:13 PM
Thanks - this is awesome!
Title: Re: Shader Resources
Post by: Goombert on September 02, 2013, 09:57:33 PM
@TKG, son of a bitch I included the wrong plugin in that XD the Enigma settings frame still won't open, update again, my fuckin bad.
Title: Re: Shader Resources
Post by: time-killer-games on September 03, 2013, 08:19:35 AM
It's all good.
Title: Re: Shader Resources
Post by: gra on September 17, 2013, 03:50:41 AM
wow great...
now i have see the youtube video  (Y)
Title: Re: Shader Resources
Post by: Aragon on December 17, 2016, 05:59:16 AM
Too bad it aint working in the current version LateralGM, i got an import issue saying its corrupt
Might wanne have a look at it?