NekoToonDocs Download

Advanced

Rendering

The Rendering section exposes the low-level GPU state of every pass: culling, depth testing, blending, color mask and draw order. Choosing a Rendering Mode already sets all of these correctly, so you only need this page for special effects or troubleshooting.

Wrong values here can make a material invisible, see-through or sort badly. If something breaks, press Reset Rendering Properties at the top of the section. It re-applies the defaults of the current rendering mode and turns GPU instancing off.

The section has one box for the main passes, and extra boxes for the PrePass (Two Pass transparent), the Outline pass and the Fur pass. The Light Bake foldout below it is covered at the end of this page.

Rendering#

Shader Type#

Normal · Lite

Switches between the full NekoToon shader and NekoToon Lite. Lite has far fewer features (for example, MatCap, Rim Light and Emission share one TriMask texture) in exchange for lower cost, and only offers the Opaque, Cutout and Transparent rendering modes. Like the rendering mode, this swaps the shader rather than setting a property.

Subpass Cutoff#

_SubpassCutoff 0 – 1 · default 0.5

Shown for Transparent, Fur and Fur (2 pass). Transparent materials cannot be half-drawn in the shadow and depth passes, so those passes use this alpha threshold instead: pixels below it cast no shadow and write no depth. Raise it if faint transparent areas cast too much shadow, lower it if thin see-through parts lose their shadow. For directional and point light shadow maps, alpha is dithered before the test, so semi-transparent areas cast a partial, dotted shadow.

Cull Mode#

_Cull Off · Front · Back · default Back

Which faces are skipped. Same property as Cull Mode in Base Setting.

ZClip#

_ZClip on / off · default on

When on, geometry beyond the camera's near and far planes is clipped as usual. When off, its depth is clamped to the planes instead, so it stays drawn. Leave it on unless you know you need depth clamping.

ZWrite#

_ZWrite on / off · default on (off for Gem)

Whether the pass writes depth. Same property as ZWrite in Base Setting.

ZTest#

_ZTest Disabled · Never · Less · Equal · LessEqual · Greater · NotEqual · GreaterEqual · Always · default LessEqual

The depth comparison a pixel must pass to be drawn. LessEqual draws pixels that are in front of or level with what is already there. Always draws on top of everything, which is a common source of "visible through walls" materials, so avoid it on avatars.

Offset Factor#

_OffsetFactor float · default 0

Depth offset scaled by the slope of the surface. Negative values pull the surface toward the camera in depth. Together with Offset Units it helps decal-like meshes that sit exactly on another surface win the depth fight without moving them.

Offset Units#

_OffsetUnits float · default 0

Constant depth offset in the smallest depth steps. Negative values pull the surface forward. Use small values (for example -1 to -10) to fix flickering (z-fighting) between overlapping surfaces.

Color Mask#

_ColorMask None · A · B · BA · G · GA · GB · GBA · R · RA · RB · RBA · RG · RGA · RGB · RGBA · default RGBA

Which color channels the pass writes. None writes no color at all. Together with ZWrite on, that makes an invisible depth (or stencil) mask. Leave it at RGBA otherwise.

AlphaToMask#

_AlphaToMask on / off · default off (on for Cutout)

Alpha to coverage: with MSAA anti-aliasing active, the pixel alpha controls how many samples are covered, which smooths the jagged edges of cut-out textures. NekoToon turns it on for Cutout and Fur (Cutout). Without MSAA it has no effect.

Shadow Caster Bias#

_lilShadowCasterBias float · default 0

Moves the surface away from the light by this distance (in world units) when it is drawn into a shadow map, on top of Unity's own bias. Small positive values (for example 0.001 to 0.01) remove shadow acne and stop hair or bangs from casting harsh shadow lines on the face. In the Built-in pipeline it is not applied to spot light shadows.

Forward / ForwardAdd blending#

Two foldouts set the blend state of the main pass (Forward) and of the Built-in pipeline's extra per-light pass (ForwardAdd, which adds point and spot lights). The final color is source × SrcBlend combined with destination × DstBlend using BlendOp. RGB and alpha are set separately.

SrcBlend RGB#

_SrcBlend / _SrcBlendFA Unity BlendMode · default One / One

Factor for the color this material outputs. Transparent sets One, because NekoToon premultiplies the color by alpha itself. Fur uses SrcAlpha.

DstBlend RGB#

_DstBlend / _DstBlendFA Unity BlendMode · default Zero / One

Factor for the color already on screen. Zero replaces it (opaque), OneMinusSrcAlpha blends over it (transparent), and One adds to it (Gem, and the ForwardAdd light pass).

SrcBlend Alpha#

_SrcBlendAlpha / _SrcBlendAlphaFA Unity BlendMode · default One / Zero

Factor for the alpha channel this material outputs. Only matters if something reads the alpha of the screen, such as some camera and streaming setups.

DstBlend Alpha#

_DstBlendAlpha / _DstBlendAlphaFA Unity BlendMode · default OneMinusSrcAlpha / One

Factor for the alpha already on screen.

BlendOp RGB#

_BlendOp / _BlendOpFA Unity BlendOp · default Add / Max

How the two weighted colors are combined. The ForwardAdd value is the same setting as Light Blending in Lighting. Max (the default) keeps point lights from adding up past the brightest one.

BlendOp Alpha#

_BlendOpAlpha / _BlendOpAlphaFA Unity BlendOp · default Add / Max

How the two weighted alpha values are combined.

Instancing and queue#

Enable GPU Instancing#

Unity material setting · default off

Lets Unity draw many copies of the same mesh with this material in one call. Useful for repeated props in worlds. It does nothing for skinned avatar meshes, so leave it off on avatars.

Render Queue#

Unity material setting · -1 = use the shader's queue

The draw order (lower first). Same field as Render Queue in Base Setting, which lists the default queue of each mode.

On Lite materials this box also shows the HDRP-only [HDRP] Before exposure limit and [HDRP] Directional Light Strength.

PrePass#

Shown for Transparent with Transparent Mode Two Pass. The same controls for the PrePass: Cull Mode (_PreCull, default Back), ZClip (_PreZClip, on), ZWrite (_PreZWrite, on), ZTest (_PreZTest, LessEqual), Offset Factor and Offset Units (_PreOffsetFactor, _PreOffsetUnits, 0), Color Mask (_PreColorMask, RGBA), AlphaToMask (_PreAlphaToMask, off) and a Forward blend foldout (_PreSrcBlend One, _PreDstBlend OneMinusSrcAlpha, and so on). The common blend choices are also available as Blending Mode in Base Setting.

Outline#

Shown on outline materials. The same controls for the outline pass, with these defaults: Cull Mode Front (_OutlineCull, so only the inside of the inflated hull is drawn), ZClip on, ZWrite on, ZTest Less (_OutlineZTest), offsets 0, Color Mask RGBA, AlphaToMask off. It also has Forward and ForwardAdd blend foldouts (_OutlineSrcBlend … _OutlineBlendOpAlphaFA). Outline width and color are set in Outline.

If the outline shows through the body or flickers, use Outline's Z Bias first. Changing the outline ZTest to Always or LessEqual is rarely what you want.

Fur#

Shown on fur materials. The same controls for the fur pass, with these defaults: Cull Mode Off (_FurCull), ZClip on, ZWrite off (_FurZWrite), ZTest LessEqual, offsets 0, Color Mask RGBA, AlphaToMask off, and blending SrcAlpha / OneMinusSrcAlpha (_FurSrcBlend, _FurDstBlend). It also has a ForwardAdd blend foldout. Fur shape is set in Fur.

Light Bake#

A separate foldout after Rendering. These are Unity's standard material options for baked lighting. They matter only for objects that are part of a lightmap bake (static world geometry), not for avatars.

Double Sided Global Illumination#

Unity material setting · default off

When on, the lightmapper treats both sides of each face as surfaces during the bake, so single-sided geometry (such as Cull Mode Off planes) bounces and blocks light from both sides.

Global Illumination#

Realtime · Baked · None · Unity material setting

Whether the material's emission contributes light to global illumination: as realtime GI, baked into lightmaps, or not at all. Use Baked on glowing world props whose light should show up on nearby surfaces after a bake.

NekoToon is a fork of lilToon by lilxyzw (MIT License). Fur styles are based on Xiexe's Unity Shaders (MIT). NekoToon and its documentation are made by Mora for 404NyanFound.