Injection Headers

Unity surface shaders can now have Alloy's area lights, colored light cookies, BRDF, etc via our code Injection Headers. If the surface shader uses either Unity's Standard or StandardSpecular lighting models, simply do the following:


  1. In the Project tab, navigate to the "Alloy/Shaders/Unity" folder.
  2. Right click on one of the files inside the folder and select "Show in explorer".
  3. In the window, select all the "*.cginc" files, and copy them.
  4. Close the window and click back into the Unity editor.
  5. In the Project tab, navigate to the folder containing a compatible Unity surface shader.
  6. Right click on the shader and select "Show in explorer".
  7. Paste the headers in the same folder as the shader.
  8. Close the window, click back into the Unity editor, and wait for the shader to automatically recompile.

Now you're ready to go.

NOTE: You will need to repeat these steps every time you download a new version of Alloy.