

Future ASE versions will include several additional shader types, along with better support for custom types, custom shader GUI, and platform specific samples. This will work for any shader code, even the Standard shader and the generated output of a Unity surface shader.Īs you may be aware, the Amplify Shader Editor BETA is currently limited to Surface Shaders. Then you can simply modify that local copy and the shader will use that instead. “Unit圜G.cginc”) you can trick that shader into using a customized local version by copying the header into the same directory as the shader.

So basically, if the shader uses an editor header (eg. If you use something like “#include “myHeader.cginc” with just the filename and no path then Unity will first look in the same directory as the shader file, and then search the editor’s hidden include directory. Your materials will be limited to the channels available in the standard surface shader, this will be improved in Stage 2.Īs Josh put it, code Injection works because of how Unity’s shader system resolves “#include” directives for handling headers. NOTE: You will need to repeat these steps every time you download a new version of Alloy. With these simple steps, your Unity surface shaders, or Amplify Shader Editor surface shaders, can now have Alloy's area lights, colored light cookies, BRDF, and much more, all thanks to code Injection Headers.

Right click on the shader and select "Show in explorer" (or Finder on OSX.In the Project tab, navigate to the folder containing a compatible Unity surface shader.Close the window and click back into the Unity editor.

In the window, select all the "*.cginc" files, and copy them.Right click on one of the files inside the folder and select "Show in explorer" (or Finder on OSX).In the Project tab, navigate to the "Alloy/Shaders/Unity" folder.
