A downloadable Surface Shader

Download NowName your own price

An elegant, lightweight PBR-lite Surface Cel Shader for Unity BiRP

Features:

  • Built-in Render Pipeline (BiRP) Support (Unity 2019.4+).
    • Works with both Forward and Deferred rendering!
  • Cel-shaded stylized lighting with PBR-lite surface options like:
    • Normal map
    • Metallic and Smoothness maps
    • Height map
    • Occlusion map
    • Emissive map
  • Basic Outline support (Reverse Hull, unlit).
    • Note: Outline shader variants only function in Forward rendering.
  • Forward Rendering Ambient Spherical Harmonics support for real-time and baked lighting.
  • Included variants for:
    • Opaque (& Outline)
    • Transparent (& Outline)
    • Transparent Cutout (& Outline)
  • Support for as many Pixel Lights as your project allows for in quality settings!
  • Support for up to 4 Vertex/Unimportant Point Lights.
  • Highly customizable per-material with a user-friendly interface for each property (LWGUI).
  • Exposed variables for advanced rendering options, including:
    • Blend RGB, Blend Alpha, and their respective basic BlendOps
    • Stencil Buffer values
    • Depth ZWrite, ZTest, and Offset
    • Alpha to Coverage
    • Color Mask
    • Cull Mode


Limitations:

  • The Outline currently only supports:
    • Forward Rendering. The outlines do not function in Deferred rendering due to pipeline differences in how the resulting shader is rendered.
    • Transparent Cutout Outline for Opaque/Transparent Cutout material types
    • Transparent Outline for Transparent material types.
      • Supporting both basic render types (Opaque, Transparent) for the Outline is planned to be expanded upon and supported somewhere in the future.
  • Only supports up to 4 Vertex/Unimportant lights per surface maximum for Forward rendering due to base Unity shader functionality/limitations.
  • Spot Light Vertex lights are unsupported.
    • They are possible to support, but would require a particularly cursed implementation that doesn't always function as intended/desired in Forward/Deferred rendering. There are no plans to support them at this time.
  • Currently, Pixel and Vertex lights do not visibly mix well when overlapping, often producing a visible artifact.
  • RGB and Alpha BlendOp enums are currently just the basic selection (D3D11 & Advanced OpenGL BlendOps removed) due to current LWGUI limitations.
  • Use of a different ShaderGUI/CustomEditor that is not LWGUI (the project's implemented CustomEditor) would require significant extra footwork.
  • The "KeyWords: System.String[] or Index: 15 Error!", error, is an LWGUI error of unknown nature, and has been reported to the developer. It does not prevent you from compiling scripts or building.


Installation:

  • Double-click the downloaded `.unitypackage` to Import it.
    • If that does not work, you can also drag and drop it into your open project.
  • In your project explorer, right-click -> Create -> Material.
  • Selecting the newly made Material, there is a drop-down at the top of the Inspector that currently says "Standard". Select the dropdown, and find the included shaders under the "Symm/*" folder. Select the shader variant you wish for this Material to use!
    • Note: There are tooltips for most of the parameters in the editor that tell you what that thing does! Hover your mouse over any parameter and a small tooltip box will appear if that parameter has a tooltip to display.
      • Note about the Note: The tooltips seem to break sometimes on initial inclusion to the project. Restarting Unity seems to fix this (most of the time).


Licensing and Terms of Service:

  • I do not take any responsibility for any possible damage that this shader can cause/causes.
  • All sales (free, with donation, or otherwise) are final, and cannot be refunded as this is a digital product.
  • Do not claim this shader as your own work. It'd be cool if you credited me where possible (I've put a lot of time and love into this!), but is not required.
    • Additional information sources are available within the shader's source code and/or from the ASE graph.
  • DO NOT remove source comments from the shader, either in the Amplify graph, Amplify metadata, or in the final shader's text file.
  • You are allowed to edit and customize the shader for your own personal use. (Effectively requires Amplify Shader Editor [v1.9.1.5+] to make significant changes easily)

All this said, the included code is all MIT licensed and the package is free. Tag me on twitter (@Symmasolan) with your cool creations using it! 


---------------------------------------------------------------------------------------------------

Not distributed with the project are the textures shown in the screenshots above. Here's a short list of what they are and where to get them!

---------------------------------------------------------------------------------------------------

Un-ending thank yous to the following amazing people who directly helped this project come to life:

  • Vulcure
    • For being a motivational engine and supporting me at every difficult turn in the project. This project would not have been completed without seeing the cool watercolor textures he created during pre-alpha when I was still figuring all the magical math out.
  • Tap
    • For getting me into contact with the first person interested in testing the shader!
  • Ether Trogg (Sekathi)
    • For helping with rigorous testing and giving constant amazing feedback through the later stages of the project's pre-alpha and beta cycle.
  • aiLar
    • For testing out the Shader through various versions on their own personal work.

---------------------------------------------------------------------------------------------------

Known Issues:

  • None currently!

---------------------------------------------------------------------------------------------------

Recent Changelog:

  • v2-01-01:
    • Fixed Opaque Outline using the wrong type of Outline masking.
    • Fixed Transparent texture being pure white by default. Changed to gray.
      • With this, I realized that there's a need for a Main Texture tint value. This minor feature will be added in the near future!
    • Fixed issue with missing LWGUI files from previous release.
  • v2-01-00:
    • Re-added the Transparent shader variants.
    • Fixed "Alpha to Coverage" for Opaque variants.
StatusReleased
CategoryAssets
AuthorSymm
Made withUnity
Tags3D, cel, npr, Shaders, toon, Unity, VRChat
Code licenseMIT License
Average sessionA few hours
LanguagesEnglish

Download

Download NowName your own price

Click download now to get access to the following files:

SymmCelShader_v2-01-01.unitypackage 147 kB

Development log

Leave a comment

Log in with itch.io to leave a comment.