Previous topicNext topic

Convert a glsl file to a text file

Questions, comments, feedback, etc.
Post Reply
edmar
Posts: 5
Joined: Mon Jan 04, 2016 2:41 pm

Convert a glsl file to a text file

Post by edmar »

Hello: I can't find a straight answer to my question in the forum, so I'm sending it by this mail.
How do you convert a glsl file to a text file? I have several glsl files which I want to use in MAGIC but just copying and pasting doesn't work.
(I'm not a programmer).
Thanks.
Edgardo Martinez
Terry Payman
Posts: 710
Joined: Sun Sep 14, 2014 8:15 am
Location: UK
Contact:

Re: Convert a glsl file to a text file

Post by Terry Payman »

Well, a GLSL file is a text file. No need to convert or do any coding.

Here are some steps to using a GLSL from https://glslsandbox.com/ in Magic. You may only need steps 6, 7 , 8 & 9 if you already have a shader file.

1) Find shader you like
2) "SHOW CODE"
3) Select all the code. Be careful not to miss any characters at the start and end.
4) Copy the code.
5) Paste the code into a text editor. Save with extension ".txt" into the location where you wish to keep your GLSL shaders.
6) Open Magic, Add > Special > GLSLShader
7) Connect the GLSLShader module to the Magic output. You should see a moving pattern in the Magic window.
8) In the GLSLShader module click on "default.txt" in the File box. "Select A File" should pop up.
9) Select your GLSL file. It should now display in the Magic window.

If you're prepared to do some simple coding you can get far more control over the GLSL shaders if you convert them into VIDVOX's ISF format, which Magic supports. The VIDVOX ISF Editor https://isf.vidvox.net/desktop-editor/ will import directly from GLSL Sandbox.
Post Reply