NekoToonDocs Download

Normal Map & Reflection

Glitter

Glitter scatters tiny sparkles over the surface that flash on and off as the camera or the light moves, like lamé fabric, sequins, nail polish or snow. The particles are generated in the shader, so no particle system or extra texture is needed.

Each sparkle is a point in a random (Voronoi) pattern laid out over the mesh UVs. Every point gets its own random facing direction, and it lights up when that direction lines up with the camera. Glitter is always added on top of the surface color, so it can only brighten.

Glitter#

Glitter#

_UseGlitter on / off · default off

Turns the glitter effect on. All other settings appear only while it is on.

UV Mode#

_GlitterUVMode UV0 | UV1 · default UV0

Which UV channel the sparkle pattern is laid out on. Sparkle size and spacing follow the UV layout, so if your UV0 islands have very different texel densities, a more even UV1 layout gives more uniform glitter.

Color / Mask#

_GlitterColorTex texture (RGBA) · default white _GlitterColor HDR color · default (1, 1, 1, 1)

The sparkle color and an optional texture multiplied with it. Use the texture as a mask so only some areas glitter, or to give different parts different sparkle colors. HDR values above 1 make the sparkles brighter (and bloom in worlds with post-processing).

Unfolding the row shows the texture's tiling/offset and its own UV Mode (_GlitterColorTex_UVMode, UV0 | UV1 | UV2 | UV3, default UV0), independent of the pattern's UV Mode above.

Alpha#

_GlitterColor.a 0 – 1 · default 1

The glitter color's alpha as its own slider: overall glitter strength.

Main Color Power#

_GlitterMainStrength 0 – 1 · default 0

Tints the sparkles by the surface's main color. At 1 a red dress gets red sparkles instead of white ones.

Enable Lighting#

_GlitterEnableLighting 0 – 1 · default 1

How much the sparkles are multiplied by the light color. At 0 they stay fully bright in dark worlds and look self-lit.

Shadow Mask#

_GlitterShadowMask 0 – 1 · default 0

Fades the glitter on shadowed parts of the model. At 1 sparkles only appear on the lit side.

Backface Mask#

_GlitterBackfaceMask on / off · default off

Hides the glitter on back faces of double-sided materials.

Apply Transparency#

_GlitterApplyTransparency on / off · default on

Only shown for transparent rendering modes. When on, the glitter is faded by the main color's alpha. Turn it off for sparkles floating in a nearly invisible material.

Shape#

Shape#

_GlitterApplyShape on / off · default off

When off, each sparkle is a round dot. When on, a texture is drawn into each sparkle instead, so you can make stars, hearts or snowflakes.

Mask (shape texture)#

_GlitterShapeTex texture · default white

The shape image. Its RGB is multiplied into the sparkle and its alpha cuts out the shape, so use a texture with transparency around the shape. The tiling/offset scale and shift the shape inside each sparkle.

Atlas#

_GlitterAtras x, y · default (1, 1)

Number of columns (x) and rows (y) if the shape texture is a sheet of several shapes. Each sparkle then picks one cell at random, giving a mix of shapes. Leave at 1, 1 for a single shape.

Randomize (Angle)#

_GlitterAngleRandomize on / off · default off

Rotates each shape by a random angle so the stars or flakes don't all point the same way.

Particles#

The first group of sliders is a friendlier view of the packed vector _GlitterParams1 (default (256, 256, 0.16, 50)) and _GlitterSensitivity; the inspector converts between them when you edit.

Scale#

_GlitterParams1.xy x, y · default (1, 1)

Size of the grid the sparkles are scattered in, per UV direction. Larger values make the pattern coarser: fewer, more widely spaced sparkles. The shader stores 256 divided by this value as the tiling, so 1 means 256 cells across the UV space.

Particle Size#

_GlitterParams1.z 0 – 2 · default 0.4 (stored squared: 0.16)

Radius of each sparkle within its cell. Small values give fine pin-point glitter; around 1 and above sparkles become large dots that may touch.

Randomize (Size)#

_GlitterScaleRandomize 0 – 1 · default 0

Varies the size of individual sparkles. At 0 they are all the same size; higher values mix in smaller and larger ones for a more natural look.

Density#

_GlitterParams1.w 0.001 – 1 · default ≈ 0.094

How many of the sparkles are lit at a given moment. Low values give rare, sharp flashes; high values make most of the sparkles visible at once. Internally this sets a contrast value (stored as 1 / (density × 1.5)²).

Sensitivity#

_GlitterSensitivity number · default ≈ 2.65 shown (0.25 stored)

How quickly sparkles switch on and off as the view angle changes. Higher values make the glitter twinkle faster when you move your head; lower values make each sparkle stay lit over a wider angle. The stored value is Sensitivity × Density and is never allowed below 0.25.

Animation and angle#

These four values are stored together in _GlitterParams2 (default (0.25, 0, 0, 0)).

_GlitterParams2.x number · default 0.25

Makes the sparkles' random directions change over time, so the glitter twinkles even when nothing moves. 0 means sparkles only change when the camera or object moves.

Angle limit#

_GlitterParams2.y number · default 0

Limits sparkles to the parts of the surface that face toward the viewer (and the light, see below), like a specular highlight. At 0 glitter appears everywhere; at 1 it fades out where the surface turns away. Values above 1 narrow the area further.

Light direction strength#

_GlitterParams2.z number · default 0

How much the main light's direction is mixed into the Angle limit. At 0 the limit is based on the view direction only; higher values move the glittering area toward where the light reflects. Has no visible effect while Angle limit is 0.

Color Randomness#

_GlitterParams2.w 0 – 1 · default 0

Gives each sparkle a random color shift by randomly reducing its red, green and blue. At 0 all sparkles have the glitter color; at 1 you get rainbow-colored glitter.

Other#

VR Parallax Strength#

_GlitterVRParallaxStrength 0 – 1 · default 0

Only matters in VR. At 0 both eyes see the same sparkles lit, which is comfortable. At 1 each eye calculates the sparkles from its own position, so a sparkle can be lit in one eye only; this looks more like real glitter but can be straining.

Normal Map Strength#

_GlitterNormalStrength 0 – 1 · default 1

How much the material's normal maps affect the Angle limit. No effect without a normal map.

Post Contrast#

_GlitterPostContrast number · default 1

A power applied to each sparkle's brightness. Values above 1 make sparkles crisper and darker at their fading edges; values below 1 make them softer and brighter.

Glitter is drawn per pixel and depends on UV density, so check it at the distance people will actually see you. If it turns into noise at a distance, raise Scale (bigger, fewer sparkles) or lower Density. Glitter is not available in the Lite shaders.

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.