Skip to main content

Shaders

The same palette lands on different property names depending on the shader. The tool looks up properties that exist on that material and skips the rest.

lilToon​

lilToon, lilToon Lite, Tessellation, and Multi are recognized by shader name. A switch in this table is used only when that property exists on the material.

RolePropertySwitch turned on with it
Primary shadow_ShadowColor_UseShadow
Shadow border_ShadowBorderColor_UseShadow
Deep shadow_Shadow2ndColor, _Shadow3rdColor_UseShadow
Rim shade_RimShadeColor_UseRimShade
Rim light_RimColor_UseRim
Backlight_BacklightColor_UseBacklight
Outline_OutlineColor, _OutlineWidthSwap to the outline shader
Highlight, specular tint_ReflectionColor_UseReflection
Gloss_MatCapTex, _MatCapColor_UseMatCap
Where the shadow border sits, and how soft it is_ShadowBorder, _ShadowBlur, _Shadow2ndBorder, _Shadow2ndBlur, _ShadowBorderRange_UseShadow

A shader variant may be missing part of this table. Missing properties are absent from the palette.

The lilToon outline is not turned on or off by a property. There are separate shaders with and without an outline. When Use Outline on the Shading tab is on, Apply swaps the material to the outline shader of the same mode. When it is off, Apply swaps to the shader without an outline. lilToon Multi also writes _UseOutline along with the swap. A mode with no outline shader, such as Fur, Gem, or Refraction, cannot have an outline, and the window says so. Revert restores the original shader and render state.

If the outline texture slot is empty, the main texture is assigned there. That way the written outline colour shows on screen as it is.

lilToon Lite​

Lite has no shadow colour properties. It reads shadow colours only from textures. So Apply builds primary and secondary shadow colour textures from the base texture and the palette, assigns them to _ShadowColorTex and _Shadow2ndColorTex, and writes the shadow border colour and shape. Shadow colour textures you placed yourself are left alone. These textures show only after Apply, not in preview.

Lite has no rim shade, backlight, or reflection. Those channels are absent from the palette.

lilToon custom shaders​

Shaders built with lilToon's custom shader system (.lilcontainer files), such as YMR+, YMRCyber, and lilSSAO, are recognized as lilToon. The tool identifies the lilToon mode from the container file the shader was built from (lts, lts_cutout, ltsl, ltsmulti, and so on), not from the shader name, and writes the same properties as for that mode.

Turning the outline on or off swaps to the matching shader of the same custom shader. For example, lilToon/YMR+/lilToon becomes Hidden/lilToon/YMR+/OpaqueOutline, never stock lilToon. If there is no matching outline shader, the outline is left as it is.

Reading the Base colour computes only lilToon's own layers. Effects a custom shader adds on top, such as SSAO, glitch, or gloss stacks, are left out.

Poiyomi​

Poiyomi Toon and Pro 9.3, 10.0, and 11.0 are supported. The version is detected from where the material's shader file lives, or from shader_master_label, and only properties present on that version are written. Any other version shows This shader family or version is not supported. No material values were written. and nothing is written.

The outline uses _LineColor and _LineWidth, and _EnableOutlines turns it on and off. Reflection uses _ReflectionColor and _StylizedSpecular. Gloss goes into _Matcap and is turned on with _MatcapEnable. Rim follows _RimStyle. Rim shade uses _RimColor on Rim Lighting 0 in the LilToon style, and rim light uses _Rim2Color on Rim Lighting 1.

The detail normal goes into a different slot per version. 9.3 uses _DetailNormalMap. 10.0 and 11.0 use Normal Map 2 (_Bump2ndMap). All of them use UV1.

Shadow colours show up only when the lighting type is Multilayer Math. Any other type ignores them, so applying a shadow colour changes nothing on screen. Issues to fix reports that state, and Switch to Multilayer Math is the only thing that changes the material. The tool does not switch the lighting type on its own.

PBR lighting (11.0) reads neither shadow colours nor the shadow mask. In that mode only metallic and smoothness reach the material, and the Surface tab shows no Shadow Mask row. To use the palette's shadows, click Switch to Multilayer Math.

When the outline tint mix (_OutlineTintMix) is not 0, the shader mixes in the base colour, so the written outline colour does not show as it is. While Set all colours and numeric values automatically is on, the tool sets it to 0. When that is off, it shows under Issues to fix, and Set outline tint mix to 0 fixes it.

A material locked by ShaderOptimizer shows a note asking you to unlock it first. The tool does not unlock it for you. Unlock it in the Poiyomi inspector, then apply. Optimization can rename or drop properties, so apply to the source material that still has them.

Other shaders​

Sampling the base colour, classifying the material, proposing a palette, editing colours, and copying colours all work regardless of shader.

Nothing is written to a shader other than lilToon and Poiyomi. The palette shows Shader application unsupported. Copy Hex and Copy Colour still move the proposed colour so you can paste it yourself.

When the shadow colour is multiplied by the base​

On lilToon and Poiyomi, shadow colours are multiplied with the base colour. The tool does not write the shadow colour you see. It writes the multiplier that produces that colour from the current base. Properties that replace or add a colour are written as the colour itself.

A base that is almost black can barely express another colour through multiplication. Those materials do not show a distinct shadow tint.