Make compatible with Shadertoy.com?
See original GitHub issueI tried pasting in a shader from shadertoy.com but it doesn’t look like the names are the same. Is there an easy way to do this?
Otherwise I can add some kind of alias system for each variable, so it checks both mouse
(ShaderEditor) and iMouse
(ShaderToy) and binds to whichever one the script is using. Does that sound like a good idea?
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Make Opentoonz compatible with shadertoy effects #3232
Opentoonz is compatible with Shader Toy in that studying Shader Toy examples is recommended in creating plugins. The mention is made (I ...
Read more >This should be allowed! - Shadertoy
Build shaders, share them, and learn from the best community.
Read more >compatible temopral reprojection - Shadertoy
my main issue here is that the scene is overdong brdf a little bit. it makes sense for the demo that it is,...
Read more >How To - Shadertoy BETA
This is a very brief introduction to how the shaders in Shadertoy interface with the rendering platform of your choice (WebGL in the...
Read more >Shader - Shadertoy BETA
... ://shadertoyunofficial.wordpress.com/2016/07/22/compatibility-issues-in-shadertoy-webglsl/ ... Looks like if I make ewidth/pwidth a variable it breaks, ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Great!
But what I meant by conversion was more like a string replacement than searching the shader for both symbols. I think supporting both sets will lead to fragmentation. So I’d try to replace ShaderToy names when importing with their existing counterparts (and add new uniforms where necessary).
Another option would be do it the other way round and change everything to work in ShaderToy. Existing shaders could be changed automatically. Probably more work and there may be inconsistencies because the app works a bit different than ShaderToy (there are uniforms that do not exist on ShaderToy, using samplers is name based and not channel based and so on).
I just don’t want to carry the burden of two name sets around 😃
Yes, the names of the uniforms are more similar to GLSL Sandbox than ShaderToy. At the moment, there’s no automatic conversation unfortunately. But that would be nice of course!
I’d go for conversion rather than supporting both sets because that would have to happen just once. Also, ShaderToy has some uniforms (and cool features) that the app doesn’t support yet. And a different way of handling samplers too (channel names instead of object names).
That said, I definitely want to support importing from ShaderToy and I too think that would really be a great feature. But there are a couple of issues I probably need to fix first: the app doesn’t support multi pass shaders yet and ShaderToy sources are quite big sometimes and Android’s highlighting method gets really slow at about 500+ loc. So right now it’d be a sub optimal experience I think.
But I’m on it and it will happen.