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/SToon/Details/04_Specular_Rim.md

View on GitHub
# Specular & Rim Light (高光与边缘光)

## 1. Stylized Specular (风格化高光)

SToon 的高光不仅仅是简单的 Blinn-Phong,它增加了数个控制项来实现卡通感。

### Logic
1.  **Standard Specular Calculation**:
    *   使用 `LightingSpecular` (URP函数) 或手动计算 Blinn-Phong (N dot H)。
    *   `Smoothness` (Glossiness) 控制高光范围。
2.  **Posterized Falloff (阶梯衰减)**:
    *   为了防止高光边缘过于柔和(写实),Shader 对高光强度进行了 Posterize 处理。
    *   函数 `FaloffPosterize`:
        ```glsl
        float FaloffPosterize( float IN, float SpecFaloff, float Steps )
        {
            // 先做一个平滑映射
            float minOut = 0.5 * SpecFaloff - 0.005;
            float faloff = lerp(IN, smoothstep(minOut, 0.5, IN), SpecFaloff);
            
            // 然后进行阶梯化
            if(Steps < 1) return faloff;
            else return floor(faloff / (1 / Steps)) * (1 / Steps);
        }
        ```
    *   **效果**: 高光可以变成一个个同心圆环,或者硬边的光斑。

3.  **Specular Mask (高光遮罩)**:
    *   **Texture**: `_SpecularMaskTexture`。
    *   **Animation**: 支持 UV 旋转 (`_SpecularMaskRotation`) 和滚动。
    *   **Halftone Interaction**: 遮罩本身也可以应用 Halftone 逻辑 (`_HaltonePatternSize`),让高光内部呈现网点状。

## 2. Rim Light (边缘光)

边缘光用于勾勒物体轮廓,使其从背景中分离出来。

### Split Color Modes (分裂颜色模式)
这是该 Shader 的一个特色,由 `_RimSplitColor` 控制:
1.  **NoSplit**: 使用单一的 `_RimColor`。
2.  **MultiplyWithDiffuse**: `_RimColor * DiffuseColor`。边缘光颜色会受到底色影响,看起来更自然,像透光(Subsurface Scattering)效果。
3.  **UseSecondColor**: 使用 `_RimColor` 和 `_RimShadowColor` 进行混合。
    *   **逻辑**: 根据物体的亮度 (`Luminance(Diffuse)`) 来决定使用哪个颜色。
    *   **应用**: 在亮部边缘显示白色 Rim,在暗部边缘显示蓝色 Rim,增强冷暖对比。

### Backlight & Side Shine
除了标准的 Fresnel Rim,还模拟了特定方向的光照效果:
*   **Backlight**: 模拟光源在物体正后方产生的轮廓光(类似于日食效果)。
*   **Side Shine**: 模拟侧侧光的掠射效果,通常用于增强金属或光滑物体的体积感。
*   **代码**:
    ```glsl
    // 计算视线反方向与主光方向的点积
    float dotResult745 = dot( ( ase_worldViewDir * -1.0 ) , _MainLightPosition.xyz );
    // 结合 Fresnel 使用
    float smoothstepResult759 = smoothstep( _SideShineHardness , 0.5 , ( clampResult753 * FresnelValue738 ));
    ```
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: 322kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 322kUpdated 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: 322kUpdated Claude CodeCodexVerifiedInstall