using shaders from shadertoy.com
using shaders from shadertoy.com
I did find a few interesting shaders on shadertoy.com and my question is: why do some shaders load without a problem in MMV and others don't? What makes a shader compatible with Magic?
-
- Posts: 719
- Joined: Sun Sep 14, 2014 8:15 am
- Location: UK
- Contact:
Re: using shaders from shadertoy.com
Are you using the VIDVOX ISF editor to convert Shadertoy shaders to ISF format?
Not an exact answer to your question, but I find that some Shadertoy shaders work perfectly in the ISF editor, some need slight edits and some have ISF editor compilation errors that are way beyond my understanding.
I think there are some Shadertoy built-in facilities that are not implemented in ISF, although I don't have the skills to spot these in the Shadertoy code and just use an empirical approach - I simply try to import it and see if it works.
It would be useful if someone with an understanding of both Shadertoy and ISF could list some ISF editor compilation errors showing which ones could have fixes/workarounds and which ones are unfixable.
Strangely, although I suspect an error on my part, I think I have had shaders that work in the ISF editor environment but not in Magic. I will save an example if it happens again.
Not an exact answer to your question, but I find that some Shadertoy shaders work perfectly in the ISF editor, some need slight edits and some have ISF editor compilation errors that are way beyond my understanding.
I think there are some Shadertoy built-in facilities that are not implemented in ISF, although I don't have the skills to spot these in the Shadertoy code and just use an empirical approach - I simply try to import it and see if it works.
It would be useful if someone with an understanding of both Shadertoy and ISF could list some ISF editor compilation errors showing which ones could have fixes/workarounds and which ones are unfixable.
Strangely, although I suspect an error on my part, I think I have had shaders that work in the ISF editor environment but not in Magic. I will save an example if it happens again.
Re: using shaders from shadertoy.com
Thanks for your reply! After my post I came across another thread about this subject and your contribution. I had already installed the ISF editor. So I used it for the failing shader and indeed it gave a programming error. It was just one, so I have to find out how to correct the error. It was about using an undeclared identifier, so maybe doable. Another shader gave numerous errors, probably because of sloppy programming, and that seems impossible for me to correct. So I support you, if someone with more shader programming experience could step in on how to repair a faulty shader, that would be nice. BTW quite a lot of shaders worked by just copying the code into a text file and load this file in MMV, so no need for the ISF editor.
Re: using shaders from shadertoy.com
The shaders that will give the most issues are the multi-buffer shaders and any shader that is 'golfed' i.e. optimised for minimal code length. There are also a few specific things that aren't supported which can't be fixed (breaks, cubemaps and others) and some standard issues that are relatively easy to fix (e.g. shadertoy allows writing to fragCoord which isn't allowed in Magic or ISF and maybe all other shader implementations).
If you're using GLSLShader module text files, the Magic_GLSLShader_compile_errors.txt will tell you what's up when it fails.
Even if a shader looks 'sloppy', given the amount of skill required to write shaders, I doubt it is anything but sloppy, in most cases. Like Terry, I've had shaders work in the vidvox editor but not in Magic - there's nothing more to be done at this stage.
If you're using GLSLShader module text files, the Magic_GLSLShader_compile_errors.txt will tell you what's up when it fails.
Even if a shader looks 'sloppy', given the amount of skill required to write shaders, I doubt it is anything but sloppy, in most cases. Like Terry, I've had shaders work in the vidvox editor but not in Magic - there's nothing more to be done at this stage.
Re: using shaders from shadertoy.com
I've just had that experience with a multi-buffer shader that ran in the ISF editor but not in Magic. After trying a few obvious attempts to fix it, I gave up with Magic_GLSL_compile_errors.txt giving this error/warning:Terry wrote:I think I have had shaders that work in the ISF editor environment but not in Magic
Code: Select all
0(370) : warning C1503: undefined variable "_BufferA_imgRect"
0(128) : error C1008: undefined variable "_BufferA_imgRect"
-
- Posts: 719
- Joined: Sun Sep 14, 2014 8:15 am
- Location: UK
- Contact:
Re: using shaders from shadertoy.com
Many thanks Sadler!
Very helpful info
Very helpful info