Skip to content

Commit

Permalink
fix(liltoon): fur shader support
Browse files Browse the repository at this point in the history
  • Loading branch information
anatawa12 committed Nov 7, 2024
1 parent 3e3a2bf commit 746b77a
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion Editor/APIInternal/ShaderInformation.Liltoon.cs
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ public override void GetMaterialInformation(MaterialInformationCallback matInfo)
return STAndScrollRotateToMatrix("_MainTex_ST", "_MainTex_ScrollRotate");
}

#region Default.lilblock / DefaultALL.lilblock
matInfo.RegisterTextureUVUsage("_DitherTex", SamplerStateInformation.LinearRepeatSampler,
UsingUVChannels.NonMesh, null); // dither UV is based on screen space

Expand Down Expand Up @@ -558,7 +559,18 @@ public override void GetMaterialInformation(MaterialInformationCallback matInfo)
}

// _BaseMap and _BaseColorMap are unused

#endregion Default.lilblock

#region DefaultFurCutout, DefaultFurTransparent, DefaultAll,
// fur
LIL_SAMPLE_2D_ST("_FurNoiseMask", "_MainTex", UsingUVChannels.UV0);
LIL_SAMPLE_2D_ST_WithMat("_FurMask", "_MainTex", uvMain, uvMainMatrix);
LIL_SAMPLE_2D_ST_WithMat("_FurLengthMask", "_MainTex", uvMain, uvMainMatrix);
LIL_SAMPLE_2D_WithMat("_FurLengthMask", SamplerStateInformation.LinearRepeatSampler, UsingUVChannels.UV0,
STToMatrix($"_MainTex_ST"));
LIL_SAMPLE_2D_WithMat("_FurVectorTex", SamplerStateInformation.LinearRepeatSampler, uvMain, uvMainMatrix);

#endregion
// Vertex ID
var idMaskProperties = new[]
{
Expand Down

0 comments on commit 746b77a

Please sign in to comment.