NekoToonDocs Download

Advanced

UV Tile Discard

UV Tile Discard hides parts of a mesh based on which UV tile they sit in. You move the UVs of each part (a jacket, a hat, an accessory) to its own whole-number tile, for example U 1–2 instead of 0–1, and the material can then hide each tile with a single toggle. This lets you keep many toggleable parts on one mesh and one material instead of splitting them into separate meshes or material slots.

The technique is also known as UDIM discard; NekoToon's implementation is based on Razgriz's version for Poiyomi Toon.

Your model needs to be prepared for this in your 3D software: move each group of vertices to a different whole-number UV tile in the chosen UV channel. Because textures repeat, a part moved by a whole tile still shows the same texture in UV0 (as long as the texture's wrap mode is Repeat). Using a spare channel such as UV1 avoids touching the UVs your textures use.

UV Tile Discard#

UV Tile Discard#

_UDIMDiscardCompile on / off · default off

Turns the feature on and shows the remaining settings. It also tells NekoToon to keep the UV Tile Discard code when you build the avatar.

Discard UV#

_UDIMDiscardUV 0: UV0 / 1: UV1 / 2: UV2 / 3: UV3 · default 0: UV0

Which UV channel decides the tile of each vertex or pixel.

Discard Mode#

_UDIMDiscardMode 0: Vertex / 1: Pixel (slower) · default 0: Vertex

Vertex removes the vertices in hidden tiles in the vertex shader, so their triangles are never drawn. It is cheap, and works when every triangle of a part lies fully inside one tile. Pixel (slower) tests every pixel and discards it, which also works for triangles that span tiles, but costs more and keeps the hidden geometry in the pipeline.

Tile grid#

_UDIMDiscardRow0_0 … _UDIMDiscardRow3_3 16 toggles · default all off

A 4 × 4 grid of unlabeled checkboxes, one per UV tile in the range 0–4 on both axes. It is laid out like the UV space: the bottom-left checkbox is the tile U 0–1, V 0–1 (the normal texture area), columns go right with U and rows go up with V. Property _UDIMDiscardRowV_U is the tile with V between V and V+1 and U between U and U+1. A checked tile is hidden. Vertices outside the 0–4 range are never hidden.

Animate the tile properties from your avatar's animator to make menu toggles for outfit parts. Any value above 0.001 counts as hidden, so the properties can be animated as floats.

UV Tile Discard is not part of the Lite shader.

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.