Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://iarri.github.io/Shadertoy2GM/
This javascript webapp converts GLSL code from shadertoy.com to Gamemaker GLSL ES as well as output other necessary code to run.
https://iarri.github.io/Shadertoy2GM/
gamemaker shadertoy text-processing
Last synced: 3 months ago
JSON representation
This javascript webapp converts GLSL code from shadertoy.com to Gamemaker GLSL ES as well as output other necessary code to run.
- Host: GitHub
- URL: https://iarri.github.io/Shadertoy2GM/
- Owner: iarri
- Created: 2020-02-17T10:54:18.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2022-01-21T18:04:03.000Z (about 3 years ago)
- Last Synced: 2024-08-02T07:11:18.214Z (6 months ago)
- Topics: gamemaker, shadertoy, text-processing
- Language: JavaScript
- Homepage: https://iarri.github.io/Shadertoy2GM/
- Size: 47.9 KB
- Stars: 6
- Watchers: 1
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-gamemaker - Shadertoy to GameMaker - Convert shadertoy.com GLSL shaders to run in GameMaker. (Shaders / Recommendations)
README
# ![logo](graphics/Logo.png)Shadertoy2GM
This javascript webapp converts GLSL code from shadertoy.com to Gamemaker GLSL ES as well as output other necessary code to run.
## What does it do?
* Adds ```varying vec2 fragCoord;```
* Replaces ```void MainImage()``` with ```void main(void)```.
* Replaces ```fragColor``` with ```gl_FragColor```.
* Replaces all instances of ```texture``` to ```texture2D```.
* Replaces all instances of ```iChannel0``` to ```gm_BaseTexture```.
* Replaces all instances of ```iTime``` to ```iGlobalTime```.
* Adds ```uniform vec3 iResolution;``` if ```iResolution.xy``` is found, else...
* ...Adds ```uniform float iResolution;``` if ```iResolution``` is found
* Adds ```uniform float iGlobalTime;```.
* Edits the pow(x, y) function to pow(abs(x), y)
* Outputs vertex, fragment, create event, and draw event.
* Warns of incompatible commands.This works for simple shaders. More complex shaders require more manual work on your part.
|Shader Inputs|Supported|
|---|---|
|iResolution|✔|
|iTime|✔|
|iTimeDelta|❌|
|iFrame|❌|
|iChannelTime|❌|
|iChannelResolution|❌|
|iMouse|❌|
|iChannel0|✔|
|iDate|❌|
|iSampleRate|❌|### What did I learn?
✔️JavaScript text processing.Any feedback is welcome! :)
## Donate
If you enjoyed this project — or just feeling generous, consider donating. Cheers!