Skip to main content

Shader Settings

lilToon

All parts use lilToon. When creating new materials, match the values on this page.

Lighting Settings (Common to All Parts)

These values are linked to the Brightness / Lighting(mono) parameters. If the values differ, new parts will behave differently from the rest when adjusting brightness.

PropertyDefault (Radial 0)Max (Radial 1)
_LightMinLimit0.051.0
_MonochromeLighting0.51.0
_LightMaxLimit1.0
_lilDirectionalLightStrength1.0
_VertexLightStrength0

Stencil System

The stencil system controls whether pixels are passed or rejected during rendering, using numeric values stored in a buffer. lilToon uses the following two properties.

PropertyRole
StencilRefReference value used for comparison (0–255)
StencilCompComparison method. Always: always passes (writes value to buffer). Equal: renders only pixels where the buffer value matches Ref. NotEqual: renders only pixels where the buffer value does not match Ref.

3+1 uses two stencil channels: Ref=1 (for hair cutout) and Ref=2 (for manga effect mask).

Hair Cutout (Eyebrows / Eyeliner)

This system makes eyebrows visible through the front hair even when the fringe overlaps them.

  1. The face mesh (SA_BODY_B / SA_BODY_C) is rendered with StencilComp: Always, writing 1 into the stencil buffer for every pixel where the face is visible.
  2. The front hair mesh (SA_HAIR_B) is rendered with StencilComp: NotEqual / StencilRef: 1, so it skips rendering on pixels where the buffer value is 1 (i.e., over the face).
  3. As a result, only the portion of the front hair that overlaps the face is cut out, revealing the eyebrows and eyeliner.
MaterialRoleStencilRefStencilComp
SA_BODY_B / SA_BODY_CFace (write)1Always
SA_HAIR_BFront hair (cut out over face)1NotEqual

When adding new front hair: Set StencilComp: NotEqual / StencilRef: 1 on the material. Without this setting, eyebrows and eyeliner will be hidden behind the hair.

Manga Effect Mask

This system restricts facial effects such as pallor to the skin area of the face only.

  1. The face skin mesh (SA_BODY_A) is rendered with StencilComp: Always, writing 2 into the stencil buffer for every pixel where the skin is visible.
  2. The manga effect (SA_EFFECT_A) is rendered with StencilComp: Equal / StencilRef: 2, so it appears only on pixels where the buffer value is 2 (i.e., over the skin).
  3. As a result, the effect is naturally masked to follow the face outline.
MaterialRoleStencilRefStencilComp
SA_BODY_AFace skin (write)2Always
SA_EFFECT_AManga effect (skin area only)2Equal

When adding effects overlaid on the face: Set StencilComp: Equal / StencilRef: 2 to restrict rendering to the skin area only.

Checklist for Adding New Parts

Part to AddRequired Stencil Setting
Front hair / parts overlapping front hairStencilComp: NotEqual / StencilRef: 1
Effects overlaid on the faceStencilComp: Equal / StencilRef: 2
Normal clothing / accessoriesNot required (leave as default)

Render Queue

MaterialRenderQueueNotes
SA_BODY_A2000Stencil write
SA_EFFECT_A2460Manga effect
SA_HAIR_A2500Hair

Placement guidelines for new parts:

  • Normal clothing / accessories: around 2000
  • Transparent / semi-transparent effects: 2450–2490
  • Parts to render above hair: 2500 or higher

HINASAKI SFX SHADER

Effects such as sweat, tears, and mosaic use HINASAKI SFX SHADER rather than lilToon. This is a suite of custom shaders featuring background refraction via GrabPass and OpenLit lighting. The shader can be switched via the "Effect Mode" dropdown in the material inspector.

ShaderUsage
Teardrop (うるうる目・落涙)Eye glistening, tears, falling droplets
Waterdrop (水滴)Sweat and other water droplets flowing across a surface
Mosaic (平面モザイク)Mosaic processing of the background

Teardrop (HSFX_Teardrop)

Teardrop sample

The effect is composed of three effect layers.

HSFX_Teardrop Inspector

Drop Texture (Falling Droplets)

PropertyDescription
Drop Texture / Drop ColorShape texture (white silhouette) and highlight color of falling droplets
Fade MaskMask controlling the fade-out at the end of the droplet's fall via the alpha channel
Horizontal Size / Vertical SizeTexture display size (1 = standard; center position does not shift)
Drop OpacityAlpha of the entire effect. Can be animated for fade-in/out

Drop Settings (Green Line)

PropertyDescription
X PositionHorizontal base position of the droplet. Adjust while monitoring the green debug line
Horizontal Random WidthRandom spread on the X axis. Larger values produce wider left–right scatter
Sway FrequencyFrequency of left–right sway during the fall. Larger values produce finer oscillation
Sway AmplitudeAmplitude of left–right sway during the fall. Larger values produce wider swaying

Tear Texture (Tears Pooling at the Inner Corner)

PropertyDescription
Tear Texture / Tear ColorShape texture and highlight color of tears pooling at the inner corner of the eye
Noise TextureShared noise texture used for both refraction noise and the glistening effect
Horizontal Size / Vertical SizeTexture display size
Tear OpacityCan be animated for fade-in/out

Tear Settings (Yellow Line)

PropertyDescription
X PositionHorizontal position of the tear. Check using the yellow debug line
Y PositionVertical position of the tear. Also serves as the base Y for the glistening effect
Noise SizeUV scale of the refraction noise. Larger values produce finer grain
Noise SpeedNoise scroll speed. Values around 0.1–0.3 are recommended
Noise StrengthStrength of the refraction noise. Excessive values will look unnatural

Glistening Texture & Settings (Blue Line)

PropertyDescription
Glisten MaskMask controlling the area of the glistening effect via the alpha channel
Y Position (added to TearY)Starting Y coordinate of the glistening effect, added to the tear's Y position
Noise Size / SpeedUV scale and scroll speed of the noise used for the glistening effect
Glisten StrengthStrength of the gloss effect. 0 = disabled / 1.0 = maximum
Noise Distance Correction (m)Reference distance for automatic noise size correction based on camera distance
Glisten FadeInfluence of refraction distortion. Can be animated for fade-in/out

Overall Effect Settings

PropertyDescription
Texture StrengthBrightness of drop/tear highlights. 0 = hidden / 1.0 = maximum
Refraction StrengthStrength of background refraction (distortion)
Fall SpeedSpeed of the droplet fall animation (0.01–3)

Waterdrop (HSFX_Waterdrop)

Waterdrop sample

A water droplet effect arranged in a grid across the entire surface.

HSFX_Waterdrop Inspector

Waterdrop Texture

PropertyDescription
Waterdrop Texture / Drop ColorShape texture (white silhouette) and highlight color of water droplets
Mask TextureMask for refraction noise overlaid on the droplets
Fade MaskDisplay area mask for the effect (white = fully visible / black = hidden)
Horizontal Size / Vertical SizeTexture display size
Waterdrop OpacityCan be animated for fade-in/out

UV Settings

PropertyDescription
Grid SizeNumber of droplet rows in UV space. Larger values stack more droplets vertically
Grid WidthNumber of droplet columns in UV space. Larger values place more droplets horizontally

Drop Settings (Green Line) / Noise Settings / Overall Effect Settings

These are the same properties as the Teardrop drop settings, noise settings, and overall effect settings.


Mosaic (HSFX_Mosaic)

Mosaic sample

A shader that applies mosaic processing to the background visible through the mesh. It has only one property.

HSFX_Mosaic Inspector
PropertyDescription
Mosaic Strength (_MosaicPercentage)Size of the mosaic blocks. 0 = no mosaic (sharp) / 1 = maximum mosaic

The block size is automatically adjusted based on camera distance and field of view (FOV), so the mosaic appears uniform even from a distance. When the camera is outside the mesh, the mosaic is applied to the front surface; when inside, it is applied to the entire back surface.


Debug Mode (Grid Mode)

Shared between Teardrop and Waterdrop. Displays guide lines for position adjustment.

ModeDisplay
NoneNormal display (default)
TransparentGuide lines only (transparent background)
BlackGuide lines only (black background)

Guide line colors: green = droplet range, yellow = tear position, blue = glistening boundary

warning

Uploading with a mode other than None will display the grid in-game as well. Always set it back to None before uploading.


OpenLit Lighting Settings

Teardrop and Waterdrop use the same OpenLit library as lilToon. When creating new materials, match the values to the base avatar.

PropertyValueDescription
_LightMinLimit0.05Minimum luminance in dark environments
_LightMaxLimit1.0Maximum luminance in bright environments
_MonochromeLighting0Applies color lights in grayscale (1.0 = monochrome)
_VertexLightStrength0Influence strength of nearby point lights
_AsUnlit0When set to 1.0, ignores lighting and renders at a constant brightness