Shader Converter

With a couple of clicks, you can easily convert GLSL image (fragment/pixel) shader to readable, usable and efficient Unity shader (HLSL), and you can preview the effect of shader immediately.


For other render pipeline, please use:

Shader Converter for Universal Render Pipeline

Shader Converter for High Definition Render Pipeline


Features:

  • The conversion workflow is very simple: One editor window, codes side to side and one button to convert.
  • Support to set SubShader Tags: Render Type and Render Queue;
  • Support to set Pass command: Cull, ZWrite, ZTest, Blend;
  • Support to specify a shader model with the #pragma target directive;
  • Support to convert Shadertoy shader with multiple passes: Common, Buffer A, Buffer B, Buffer C, Buffer D;
  • Support to auto assign Shadertoy input: iFrame, iFrameRate, iMouse, iDate, iSampleRate, _iChannelTime;
  • Supports the same keyboard and mouse input as Shadertoy;
  • Support 2D textures, cubemaps, video and music/sound input;
  • Supports to convert main image shader to object space shader or full screen shader;
  • [NEW] Object space shader supports both VR (Single Pass Instanced) mode and non-VR mode;
  • Supports to render the effect of main image shader to RenderTexture;
  • [NEW] Supports Gamma and Linear color space;
  • [NEW][Experimental] Simple global numeric global macros and constants defined in the shader can be extracted into the properties of the shader;

Notes:

* Tested in Unity 2019.4.28, Unity 2020.3.38, Unity 2021.3.25, Unity 2022.3.60 and Unity 6000.0.23;

* This editor tool only support 64-bit Unity Editor on Windows for now!

* Converted shader with this editor tool only support Built-in Render Pipeline!

* This editor tool cannot convert shaders for Built-in render pipeline to shaders for URP or HDRP!



Support:

If you have any questions, issues or suggestions, feel free to email me at:

reformsim@outlook.com


Forum Thread