Skip to content

Rendering Path

NiloToon supports all Rendering Paths in URP:

  • Forward
  • Forward+
  • Deferred
  • Deferred+ (Unity 6.2 or later)

NiloToon's recommended settings:

  • Rendering Path = Forward / Forward+
  • Depth Priming Mode = Disabled

Rendering Path settings


Lighting Limitations

  • Forward+ + Depth Priming Mode = Off: Fully renders all NiloToon features, supporting 256 visible lights on screen (unlimited lights in the scene, no per-renderer light count limit)

  • Forward + Depth Priming Mode = Off: Fully renders all NiloToon features, supporting 8 additional lights per renderer (unlimited lights in the scene)

If you need to use Deferred / Deferred+ Rendering Path or enable Depth Priming Mode, review the information below to understand the limitations of these features:

Note

These features are typically related to semi-transparent front hair and eyebrow rendering.


Stencil

Stencil settings

Rendering Path Supported?
Forward (Depth Priming = Off) Supported
Forward+ (Depth Priming = Off) Supported
Forward (Depth Priming = On) Supported
Forward+ (Depth Priming = On) Supported
Deferred Prevented by URP
Deferred+ Prevented by URP

In URP, when using Deferred / Deferred+, opaque queue materials (Render Queue <= 2500) will ignore the material's Stencil settings and replace the actual Stencil setting with URP's own values when drawing the Opaque Color pass (LightMode = UniversalForwardOnly).

URP Deferred Stencil override

This is by URP's design and applies to all custom shaders (NiloToon, Amplify Shader Editor, custom code-based shaders, etc.). There is nothing that can be done unless URP changes this in the future.

Solution:

If you need Stencil in opaque queue materials (Render Queue <= 2500):

  • Use Forward/Forward+ instead of Deferred/Deferred+
  • Or try switching the material's Surface Type to Transparent/**
  • Or try changing the material's Render Queue to >=2501

Alpha Blending

Rendering Path Supported?
Forward (Depth Priming = Off) Supported
Forward+ (Depth Priming = Off) Supported
Forward (Depth Priming = On) Prevented by URP
Forward+ (Depth Priming = On) Prevented by URP
Deferred Supported (Unity 6.2+)
Deferred+ Supported (Unity 6.2+)

When a material has RenderQueue <= 2500, URP does not expect it to be semi-transparent and always treats it as opaque. Depth Priming rejects pixel rendering behind opaque queue materials, so there may not be a correct color to alpha blend with.

Solution:

If you need Alpha Blending in opaque queue materials (Render Queue <= 2500):

  • Switch to a supported Rendering Path for your Unity version
  • Or try switching the material's Surface Type to Transparent/**
  • Or try changing the material's Render Queue to >=2501

ZOffset

Rendering Path Supported?
Forward (Depth Priming = Off) Supported
Forward+ (Depth Priming = Off) Supported
Forward (Depth Priming = On) Not supported by NiloToon yet
Forward+ (Depth Priming = On) Not supported by NiloToon yet
Deferred Supported
Deferred+ Supported

When Depth Priming = On, materials (Render Queue <= 2500) can only draw with depth matching the Depth Priming depth buffer (ZTest is forced to Equal after Depth Priming). Enabling ZOffset makes the material unable to render if the final ZOffset is not equal to 0.

Solution:

  • If you need ZOffset in opaque queue materials in Forward/Forward+, turn off Depth Priming

Shadow 2D on Face

Rendering Path Supported?
Forward (Depth Priming = Off) Supported
Forward+ (Depth Priming = Off) Supported
Forward (Depth Priming = On) Not supported by NiloToon yet
Forward+ (Depth Priming = On) Not supported by NiloToon yet
Deferred Supported
Deferred+ Supported

When Depth Priming = On, NiloToon disables Shadow 2D on Face because this feature relies on depth offset to the Depth Texture for the face area.

Solution:

  • If you need to render Shadow 2D on face in Forward/Forward+, turn off Depth Priming

Summary Table

Limitations for NiloToon material features on opaque queue materials (Render Queue <= 2500):

Rendering Path Stencil Alpha Blending Shadow2D on Face ZOffset
Forward (Depth Priming = Off) Supported Supported Supported Supported
Forward+ (Depth Priming = Off) Supported Supported Supported Supported
Forward (Depth Priming = On) Supported Prevented by URP Supported (NiloToon 0.18.x+) Not supported
Forward+ (Depth Priming = On) Supported Prevented by URP Supported (NiloToon 0.18.x+) Not supported
Deferred Prevented by URP Supported (Unity 6.2+) Supported Supported
Deferred+ Prevented by URP Supported (Unity 6.2+) Supported Supported

Recommended Setting

Forward and Forward+ (Depth Priming = Off) support all NiloToon features and are the recommended settings.


PC Project Setting Examples

This section shows example settings from a Unity 6.0 PC concert demo template project. You do not need to copy these settings exactly; they are provided as reference for concert project work.


Camera

  • TAA only (RenderScale = 2), or DLSS.NativeAA only (RenderScale = 1)
  • MSAA = off (VRAM limit pressure at 4K/8K). FXAA/SMAA are not used
  • Dithering may be enabled if color banding from volumetric light appears

Camera settings - TAA Camera settings - DLSS

Note

  • Left image = TAA only (RenderScale = 2), suitable for 1080p, 1440p or 4K with a good GPU (RTX 4080 or higher)
  • Right image = DLSS only (RenderScale = 1), for high resolutions like 4K to 8K

URP Asset

Setting Value Description
GPU Resident Drawer Off High CPU base cost. Enable only with lots of instancing (e.g., total instance count >10k)
SRP Batcher On Unless you have a reason to disable it
HDR On Needed for concert-type HDR lighting + Bloom
MSAA Off VRAM limit pressure or TAA requirement
RenderScale As high as possible (1-2) Greatly improves anti-aliasing quality! When RenderScale > 1, URP performs Super Sampling (SSAA) internally. RenderScale = 2 means 2x2 = 4x GPU cost (VRAM and fragment shading)

Caution

When DLSS is used, RenderScale is always locked at 0.3333-1 depending on DLSS's Quality option. You cannot use DLSS and RenderScale > 1 together.

URP Asset settings 1 URP Asset settings 2


Renderer

  • Rendering Path = Forward+: Supports up to 255 visible realtime lights. Lights aiming at the character should also have Soft Shadow enabled for improved lighting quality on the character and stage ground. Non-critical lights should have shadow disabled due to CPU performance cost
  • Depth Priming Mode = Disabled (for producing face 2D shadow)
  • Native RenderPass = Off

Renderer settings


Project Setting > Player

Important settings:

Setting Value
ColorSpace Linear
GraphicsAPI DX12
GPU Skinning Batched
Graphics Jobs enable + Split
Scripting Backend IL2CPP
Incremental GC On

Note

DX12 is not required but is strongly recommended for the faster CPU render loop. If DX12 does not work, fall back to DX11.

Player settings 1 Player settings 2


Project Setting > Editor

Setting Value Description
Parallel Import Off Enabling this may corrupt NiloToon FBX prefabs
Enter Play Mode Setting Do not reload Domain or Scene Not required, but saves significant time when entering Play Mode in the Editor. NiloToon supports this, but other assets may not, so use with caution

Editor settings


Project Setting > Quality

  • Ensure Meshes > Skin Weights is set to Unlimited. This improves character skinning results.

Quality settings


Project Setting > Graphic

  • Render Graph > Compatibility Mode = On or Off both work. If NiloToon rendering results differ between them, contact the development team!
  • For better performance, we recommend setting Compatibility Mode to OFF (= RenderGraph ON).

Caution

In Unity 6.4, Compatibility Mode is completely removed.

Graphic settings


Notable Assets Used

# Purpose Asset
1 Character Shader NiloToon (NiloToon_Character Shader)
2 Postprocess Volume NiloToon (Bloom, Tonemapping, Cinematic RimLight control, character render control, shadow control, motion blur, etc.)
3 Lighting Style Control NiloToon (NiloToonLightSourceModifier)
4 Realtime Motion Blur NiloToon
5 Offline Motion Blur Baking NiloToon

Unity 6 Introduction

If you want to upgrade from Unity 2022.3 to Unity 6, the following section provides subjective opinions for your reference before spending time on the upgrade.


Which Unity 6 is Better?

We always recommend using the latest Unity 6 LTS available through UnityHub. We do not recommend alpha/beta Unity 6 versions.


Unity 6 Stability

Unity Version Stability
Unity 2021.3 7/10 - Quite stable due to fewer features
Unity 2022.3 6/10 - Some early versions were 0/10 due to URP RenderTexture memory leak and crashes
Unity 6000.0 8/10 - In use since 2024 Q3, surprisingly stable

Upgrade Difficulty

Upgrade Path Difficulty
Unity 2021.3 to Unity 2022.3 Painful - many API changes related to RTHandle and Renderer Features
Unity 2022.3 to Unity 6000.0 Relatively easy - minor API changes with RenderGraph Compatibility Mode enabled. May encounter 'RenderTargetHandle' is obsolete issues requiring RTHandle API updates
Unity 6000.0 to Unity 6000.3 Painful only if Renderer Features do not support Render Graph. Compatibility Mode becomes hidden and deprecated
Unity 6000.3 to Unity 6000.4 Painful only if Renderer Features do not support Render Graph. Compatibility Mode is completely removed

New Features in Unity 6

Useful Features

The most useful new features in Unity 6:

Feature Description
6-way Lighting Smoke VFX Graph Smoke VFX lit by lights. Heavily used in concert projects
DX12 Split Graphics Jobs Much better render loop CPU performance. No negative effect on visual results
DX12 Graphics Jobs for Editor Much better render loop CPU performance in the Editor as well
Batched GPU Skinning Better GPU performance when character models have many SkinnedMeshRenderers and Blendshapes
GPU Resident Drawer May improve CPU performance when rendering large amounts (>10K) of identical MeshRenderer GameObjects. Has a fixed per-frame CPU cost, so performance decreases if GPU instancing is not heavily utilized
Adaptive Probe Volumes (APV) An automatic, improved version of the old Light Probe system. No manual Light Probe placement needed. Lighting quality is per-pixel instead of per-renderer
Screen Space Lens Flare Typically used for concert lighting effects
VFX Graph Motion Vectors Allows opaque particles (e.g., confetti) to correctly affect Motion Blur/TAA/DLSS

Features Not Used

Good for performance, but most projects target PC platforms, so higher-quality alternatives are preferred:

Feature Reason
URP Object Motion Blur Fast but insufficient quality. Use when faster GPU performance is needed (e.g., mobile)
STP Poor in motion. DLSS/XeSS always provides better visual results. Try on non-PC platforms (e.g., mobile)

Unity 6 Changes

For NiloToon specifically, not much has changed in Unity 6. There should be no major NiloToon compatibility issues after upgrading from Unity 2022.3 to Unity 6.

NiloToon improvements exclusive to Unity 6:

  • Better character Motion Vector Pass = better and more correct motion vector generation, improving DLSS/TAA/Motion Blur visual results
  • New NiloToon Motion Blur Volume

Unity 6 Upgrade Procedure

To upgrade to Unity 6:

  1. Backup the project (commit in version control / copy project files)
  2. Upgrade to the latest NiloToon (at least NiloToon 0.16.x latest)
  3. Play in the Editor and confirm everything works as expected
  4. Reopen the project with the latest Unity 6 LTS
  5. If visual issues occur, try enabling/disabling RenderGraph Compatibility Mode to check for differences
  6. Check error logs - some assets/tools in your project may be too old for Unity 6 and need updating
  7. Check for remaining error logs - Unity 6 has breaking C# API changes, but they are few and should not be difficult to fix
  8. Play in the Editor and check for remaining error logs
  9. Try building the application