I know this is a bit of a noob Shader question for any Shader gurus, but can any experts tell me if its possible to convert the shader examples from ShaderToy so they will compile and render in Unity5?
Possible? Yes. Easy? No.
ShaderToy demonstrates some (very clever) GLSL pixel shaders. Unity, however, uses Cg shaders. It’s possible to achieve the same functionality with both languages, but there’s no automatic conversion tools that I know of, so it requires manual effort to first understand what the original shader is doing, and then rewrite that in Cg.
There’s some good news, however:
- most shaders are, at most, a couple of hundred lines, so it’s not too onerous even for a beginner to step through a line at a time.
- Cg is very similar to HLSL, and there is at least some online documentation explaining the GLSL->HLSL conversion process, such as: GLSL-to-HLSL reference - Windows app development | Microsoft Learn
Hi I Created Simple Converter from ShaderToy to Shaderlab Unity
Download Link: GitHub - smkplus/ShaderMan: Convert ShaderToy to Unity HLSL/CG
https://forum.unity.com/threads/converting-a-shadertoy-multipass-shader-to-unity-hlsl.418238/
I hope someone help me to develop it…