-
-
Notifications
You must be signed in to change notification settings - Fork 29
Decals
Vladislav Kantaev edited this page Mar 24, 2024
·
11 revisions
📝 Note: regardless of the options, decals require Depth Pre-Pass.
Decals in Toon RP require setting up a custom shader. The following are instructions for Shader Graph:
- Create a new Default/Unlit shader graph (
Create/Shader Graph/Toon RP
->Default Shader Graph
orUnlit Shader Graph
). - In Graph Settings, set
Surface Type
toTransparent
and disableCast Shadows
. - Create the following setup:
-
Toon RP Decal Space UV SubGraph
provides UV, which we use to sample a texture. - Pass the resulting color and alpha to the corresponding inputs of the fragment stage.
- (For Default Shader Graph) Pass
PositionWS
from the decal node to the fragment output.
The next step is to setup a decal GameObject:
- Create
3D Object/Cube
. - Remove the collider component.
- Setup the decals size (Scale) and rotation:
- The decal is projected onto the XY size along the Z axis (local forward direction/blue arrow).
📝 Note: Requires Normals Pre-Pass.
- In Graph Settings, set
Fragment Normal Space
toWorld
. - Add a
Toon RP Scene Normals SubGraph
node and pass its result to theNormal (World Space)
fragment output.
...
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