-
-
Notifications
You must be signed in to change notification settings - Fork 30
Shader Graph
⚠️ Warning: Shader Graph is not yet fully supported. Some of the missing fuctionality can be found in the Known Issues section.
The following graph types are implemented at the moment:

To create a shader graph, right click in the Project window, select Create/Shader Graph/Toon RP and choose the required graph type.
This subsection lists properties used in all shader graph types provided by Toon RP.
Graph settings:
-
Surface Type-Opaque/Transparent -
Blending Mode-Alpha/Premultiply/Additive/Multiply -
Render Face-Back/Front/Both -
Depth Write-Auto/Force Enabled/Force Disabled Depth TestAlpha Clipping-
Alpha To Coverage- AlphaToMask -
Control Outlines Stencil Layer- enablesOutlines Stencil Layerin material inspector, used to prevent inner outlines (applicable to Inverted Hull Outlines) Fog-
Custom Fog- adds an overlay color, which can be used for fog-like effects. It is blended on top of the output color viaCustom Fog FactorandCustom Fog Color). Cast Shadows-
Ignored Pre-Passes- specify the pre-passes to exclude from generation
Fragment outputs:
-
Albedo- Color -
Emission- HDR Color -
Alpha- Float -
Alpha Clip Threshold- Float -
Custom Fog Factor- Float -
Custom Fog Color- Color
Built-in material properties:
Outlines Stencil Layer
A graph with the full lighting model, similar to what is offered in Toon RP/Default.
Graph settings:
Receive Shadows-
Override Ramp- enables control over threshold and smoothness in the fragment shader (for diffuse, specular, and rim separately) -
Specular- enables specular lighting -
Additional Lights Specular- enables specular lighting for additional lights -
Rim- enables rim (fresnel) lighting Environment Lighting-
Fragment Normal Space-Tangent/Object/World- changes the space of theNormalinput in the fragment stage
Fragment outputs:
-
Shadow Color- RGB for shadow color, A for shadow opacity -
Override Ramp Threshold,Override Ramp Smoothness- threshold and smoothness for the overriden ramp. Specular and rim have their own outputs, which are only visible if the corresponding options are enabled in theGraph Settings. -
Emission Shadow Blend- controls how emisison should attenuate in shadow (1 - full emission, 0 - no emission).
Built-in material properties:
Receive Blob Shadows
A basic unlit shader similar to Toon RP/Unlit.
A shader for particles similar to Toon RP/Particles/Unlit.
Graph settings:
-
Soft Particles- enables smooth fade when close to opaque geometry. Requires Depth Pre-Pass. Activates theSoft Particles DistanceandSoft Particles Rangeoutputs.
Fragment outputs:
-
Soft Particles Distance- how close to opaque geometry the fade should start -
Soft Particles Range- the smoothness of the soft particles fade
A shader graph type for overriding materials of Inverted Hull Outline.
Vertex outputs:
-
Outline Thickness- extra multiplier for outline thickness.

Computes UV and samples a matcap texture.
Inputs:
-
OriginalColor- source albedo color. Used for blending with the resulting matcap color. MatcapTexture-
MatcapTint- additional color, which is multiplied with aMatcapTexturesample. MatcapUV_Tiling, MatcapUV_Offset-
Blend- a parameters used to blend between theOriginalColorand computed matcap color.
Outputs:
Out_Result
Unsupported nodes:
- ...
Getting Started
Platform Support
Lighting and Shadows
- Global Ramp
- Shadows
- Variance Shadow Maps (VSM)
- Soft Shadows
- Additional Lights
- Additional Light Shadows
- Tiled Lighting (Forward+)
- Blob Shadows
- Fake Additional Lights
- Baked Lighting
Render Quality
Miscellaneous
Post-Processing
- Post-Processing Stack
- Bloom
- Inverted Hull Outline
- Screen-Space Outline
- SSAO
- Motion Blur
- Sharpen
- Light Scattering
Making Custom Shaders
Debugging