NekoToonDocs Download

Advanced

Refraction

The Refraction rendering modes make a material see-through while bending the background behind it, like glass, water, ice or a heat-haze. The Refraction foldout only appears when the Rendering Mode is [high-load] Refraction or [high-load] Refraction Blur.

Both modes use a GrabPass, a copy of everything drawn behind the object, which costs performance (and Refraction Blur takes many extra texture samples per pixel). Keep refractive surfaces small, such as glasses lenses or a bottle, not a full outfit. Because the copy is shared per frame, two refractive objects generally don't show each other through themselves. Refraction materials have no outline and no fur.

How it blends#

The refracted background is mixed with the material's normal lit color using the main color's alpha: alpha 0 shows only the refracted background, alpha 1 shows only the material, values in between mix them. So you control how "clear" the glass is from the Main Color alpha (or its texture's alpha). If Reflection is turned on, the environment reflection is mixed in on top and becomes stronger toward the edges, which is what makes glass read as glass.

Refraction#

Strength#

_RefractionStrength -1 – 1 · default 0.1

How far the background is shifted, based on which way the surface faces. Small values (0.05–0.2) look like thin glass; large values look like a thick lens or water drop. Negative values bend in the opposite direction; 0 shows the background undistorted (plain transparency).

Fresnel#

_RefractionFresnelPower 0.01 – 10 · default 0.5

Where the distortion happens. The shift is scaled by how edge-on the surface is, raised to this power. Low values distort the whole surface; high values keep the centre clear and bend only near the silhouette, like a glass sphere.

Get color from Main#

_RefractionColorFromMain on / off · default off

When on, the refracted background is also multiplied by the main color (and texture), so colored glass tints what you see through it. When off, only the Color below tints it.

Color#

_RefractionColor color · default (1, 1, 1, 1)

Tint multiplied into the refracted background. White leaves it unchanged; a light blue gives water or ice; darker colors make sunglasses.

Refraction Blur#

[high-load] Refraction Blur uses the same settings, but also blurs the background for frosted glass. The blur amount comes from Smoothness in the Reflection settings: lower smoothness gives a stronger blur, and the blur shrinks with distance from the camera. In the built-in render pipeline (what VRChat uses) it draws the object twice: a first pass blurs the background horizontally, then a second, per-object GrabPass copies the screen again and the main pass blurs it vertically. That is two screen copies and dozens of texture samples per pixel, so it is noticeably more expensive than plain Refraction.

For glasses lenses: Refraction mode, main color white with alpha around 0.1, Strength about 0.05, Fresnel around 1, and a small Reflection with high smoothness. For water, lower the main alpha to 0 and use a light-blue Color with a normal map for ripples; the normal map drives the distortion.

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.