Skip to content

LeoYeAI/agent-master-skills / skills/animation-shader

animation-shader

Verified

READ this skill when implementing or configuring animation-style shaders (Toon/Cel Shaders) — including outlines, rim lighting, toon shading, MatCap, emission, dissolve, hatching, or any stylized rendering effect. Contains preset styles and feature-to-reference mappings for lilToon, Poiyomi, UTS2, RToon, SToon, and ToonShadingCollection. Works as a domain knowledge plugin alongside workflow skills (OpenSpec, SpecKit) or plan mode of an agent.

FileKindSize
SKILL.mdskill md17.0 KB
_meta.jsonconfig285 B
references/PoiyomiShaders/Details/01_Base_Main.mdmarkdown4.8 KB
references/PoiyomiShaders/Details/02_Lighting_Shadows.mdmarkdown4.9 KB
references/PoiyomiShaders/Details/03_Surface_Reflections.mdmarkdown3.9 KB
references/PoiyomiShaders/Details/04_Special_Effects.mdmarkdown3.4 KB
references/PoiyomiShaders/Details/05_Outline.mdmarkdown2.6 KB
references/PoiyomiShaders/Features.mdmarkdown2.1 KB
references/RToon/Details/01_Core_Shading.mdmarkdown5.3 KB
references/RToon/Details/02_ShadowT.mdmarkdown3.1 KB
references/RToon/Details/03_Outline.mdmarkdown4.6 KB
references/RToon/Details/04_MatCap_Reflection.mdmarkdown3.6 KB
references/RToon/Details/05_Gloss_Rim.mdmarkdown3.2 KB
references/RToon/Details/06_Advanced_Features.mdmarkdown3.3 KB
references/RToon/Features.mdmarkdown4.2 KB
references/SToon/Details/01_Core_Shading.mdmarkdown3.4 KB
references/SToon/Details/02_Outline.mdmarkdown2.9 KB
references/SToon/Details/03_Overlays.mdmarkdown3.1 KB
references/SToon/Details/04_Specular_Rim.mdmarkdown2.7 KB
references/SToon/Details/05_Artistic_Controls.mdmarkdown3.2 KB
references/SToon/Features.mdmarkdown2.6 KB
references/ToonShadingCollection/Details/01_ArtStyles.mdmarkdown2.5 KB
references/ToonShadingCollection/Details/02_Outline.mdmarkdown4.4 KB
references/ToonShadingCollection/Details/03_Diffuse.mdmarkdown4.5 KB
references/ToonShadingCollection/Details/04_Specular.mdmarkdown3.2 KB
references/ToonShadingCollection/Details/05_Environment.mdmarkdown3.1 KB
references/ToonShadingCollection/Details/06_PBR_Stylization.mdmarkdown4.6 KB
references/ToonShadingCollection/Details/07_Stylized_Features.mdmarkdown4.0 KB
references/ToonShadingCollection/Details/08_PostProcessing.mdmarkdown3.5 KB
references/ToonShadingCollection/Details/09_Lighting_Shadows.mdmarkdown3.1 KB
references/ToonShadingCollection/Details/10_Animation_VFX.mdmarkdown3.7 KB
references/ToonShadingCollection/Details/11_Modeling_Pipeline.mdmarkdown2.9 KB
references/ToonShadingCollection/Features.mdmarkdown2.1 KB
references/UnityChanToonShaderVer2/Details/01_DoubleShade.mdmarkdown3.6 KB
references/UnityChanToonShaderVer2/Details/02_ShadingGradeMap.mdmarkdown3.1 KB
references/UnityChanToonShaderVer2/Details/03_Outline.mdmarkdown2.7 KB
references/UnityChanToonShaderVer2/Details/04_SpecialFeatures.mdmarkdown3.6 KB
references/UnityChanToonShaderVer2/Features.mdmarkdown5.6 KB
references/lilToon/Details/01_Base_Main.mdmarkdown4.8 KB
references/lilToon/Details/02_Lighting_Shadows.mdmarkdown3.9 KB
references/lilToon/Details/03_Surface_Reflections.mdmarkdown4.2 KB
references/lilToon/Details/04_Special_Effects.mdmarkdown4.7 KB
references/lilToon/Details/05_Advanced.mdmarkdown3.9 KB
references/lilToon/Details/06_Variants.mdmarkdown3.4 KB
references/lilToon/Details/07_Variant_Features.mdmarkdown4.8 KB
references/lilToon/Details/08_Outline.mdmarkdown3.3 KB
references/lilToon/Features.mdmarkdown3.3 KB
workflow-standalone.mdmarkdown6.4 KB

references/RToon/Details/02_ShadowT.md

View on GitHub
# ShadowT (Shadow Texture / 阴影纹理)

ShadowT 是 RToon 的特色功能,全称可能是 Shadow Texture 或 Shadow Tone。它允许在阴影区域叠加一层纹理,用于实现漫画网点(Halftone)、排线(Hatching)或特定的风格化纹理。

## 1. Properties (参数)

*   `_ShadowT` ("ShadowT", 2D): 阴影区域显示的纹理贴图。
*   `_ShadowTIntensity` ("Intensity", Range(0, 1)): 纹理的强度/不透明度。
*   `_ShadowTColor` ("Color", Color): 纹理的颜色叠加。
*   `_ShadowTLightThreshold` ("Light Threshold"): 控制纹理在光照过渡区域的显示范围。
*   `_ShadowTShadowThreshold` ("Shadow Threshold"): 控制纹理在阴影深处的显示范围。
*   `_ShadowTHardness` ("Hardness"): 纹理显示的边缘硬度。
*   `_ShowInAmbientLightShadowIntensity` ("Show In Ambient Light"): **[特色]** 允许纹理在环境光(非直射光)下依然可见。这对于保持角色身上的固有风格纹理(如布料纹理)非常重要。

## 2. Implementation (实现原理)

位于 `RT_URP_Core.hlsl` 中的 `RT_ST` 函数。

### 核心逻辑

ShadowT 的计算依赖于光照强度 (`attenuation`, `NdotL`) 和环境光。

```glsl
half RT_ST(float2 uv, float3 positionWS, float3 normalDirection, half RTD_NDOTL, half attenuation, ...)
{
    // 1. 采样贴图
    float4 _ShadowT_var = SAMPLE_TEXTURE2D(_ShadowT, sampler_ShadowT, TRANSFORM_TEX(uv, _ShadowT));
    
    // 2. 环境光下的显示逻辑
    // 如果开启 _ShowInAmbientLightShadowIntensity,即使没有直射光阴影,纹理也会基于环境光强度显示
    half RTD_ST_IS_ON = smoothstep(hardness, 0.22, (_ShowInAmbientLightShadowThreshold * _ShadowT_var.rgb));
    
    // 3. 阴影区域蒙版计算
    // 结合 NdotL 和 Attenuation (LightFalloff)
    half RT_LFOAST_OO = attenuation * RTD_NDOTL; // 光照强度因子
    
    // 核心公式: 根据光照强度决定纹理可见性
    // 这里的逻辑比较复杂,本质是:当光照变弱时,混合进 ShadowT 纹理
    half RTD_ST_In_Sli = lerp(1.0, 
        smoothstep(hardness, 0.22, 
            ((_ShadowT_var.r * (1.0 - _ShadowTShadowThreshold)) * (RT_LFOAST_OO * _ShadowTLightThreshold * 0.01))
        ), 
        _ShadowTIntensity);
        
    return RTD_ST_In_Sli;
}
```

## 3. Usage & Analysis (分析与用法)

### 典型用法
1.  **漫画网点 (Halftone)**: 
    *   将 `_ShadowT` 设为网点平铺贴图。
    *   调整 `_ShadowTLightThreshold` 使其仅在明暗交界处出现,或覆盖整个暗部。
2.  **手绘排线 (Hatching)**:
    *   使用排线纹理。
    *   配合 `_ShadowTHardness` 制作柔和的素描感。
3.  **暗部细节**:
    *   有些美术风格要求暗部不要死黑,而是有纹理细节(如衣服织物感)。
    *   通过 `_ShadowTColor` 提亮暗部并叠加纹理。

### 与 Self Shadow 的区别
*   **Self Shadow**: 决定了**哪里是阴影**(宏观的明暗形状)。
*   **ShadowT**: 决定了**阴影里长什么样**(微观的纹理填充)。
*   两者通常结合使用:Self Shadow 切出阴影块,ShadowT 填充阴影块。
reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.Stars: 323kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 323kUpdated Claude CodeCodexVerifiedInstall
executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is availableStars: 323kUpdated Claude CodeCodexVerifiedInstall