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/05_Artistic_Controls.md

View on GitHub
# Artistic Controls (艺术控制)

除了核心的光照和描边,SToon 还提供了一系列“破坏性”或“动态”的控制功能,用于打破计算机渲染的完美感,增添手绘或有机风格。

## 1. Diffuse Warp (漫反射扭曲)

这是一个非常有趣的功能,它不直接改变光照模型,而是通过扰动 NdotL 的计算结果来扭曲阴影边缘。

### Logic
*   **Source**: 使用一张噪点贴图 (`_DiffuseWarpNoise`)。
*   **Transform**: 支持独立的 UV Tiling (`_WarpTextureScale`) 和 Rotation (`_WarpTextureRotation`),甚至支持屏幕空间 UV (`_UseScreenUvsWarp`)。
*   **Implementation**:
    ```glsl
    // 采样噪点
    float BNLightWarpVector250 = ( _UseDiffuseWarp == 1.0 ? ( tex2D( _DiffuseWarpNoise, rotator1489 ).r * _WarpStrength ) : 0.0 );
    
    // 扰动 NdotL
    // 公式: Warp * (1 + NdotL) ... 或类似的混合逻辑
    // 实际代码看起来像是:
    float3 temp_cast_7 = (( BNLightWarpVector250 + ( ( 1.0 - BNLightWarpVector250 ) * BNNDotL233 ) )).xxx;
    float3 temp_output_260_0 = ( max( temp_cast_7 , float3(0,0,0) ) * BNAttenuationColor244 );
    ```
*   **Effect**: 阴影边缘不再是平滑的曲线,而是呈现出被噪点侵蚀、扭曲的形状。这非常适合模拟水彩、油画或粗糙纸张上的颜料扩散效果。
*   **Impact on Shadows**: 可以选择 `_UseDiffuseWarpAsOverlay`,决定这个扭曲是仅影响漫反射本身,还是也影响接收到的阴影形状。

## 2. UV Animation (UV 动画)

Shader 为几乎所有主要的纹理层(Overlay, Specular Mask, Diffuse Warp)提供了统一的 UV 动画支持。

### Features
*   **Scroll (滚动)**: `_UVScrollSpeed`。简单的 `Time * Speed` 偏移。
*   **Rotation (旋转)**: `_UVSrcrollAngle`。通常结合时间变化。
*   **Frame Animation (帧动画)**: 代码中包含 `floor( ( Time % 2.0 ) * 0.5 )` 这样的逻辑,似乎支持简单的 2 帧切换或闪烁效果,模拟低帧率的手绘动画感。
    ```glsl
    float mulTime1278 = _TimeParameters.x * _UVAnimationSpeed;
    float temp_output_1281_0 = ( floor( ( mulTime1278 % 2.0 ) ) * 0.5 );
    ```

## 3. Occlusion (环境光遮蔽)

支持标准的 `_OcclusionMap`。

*   **Logic**:
    ```glsl
    float lerpResult1655 = lerp( 1.0 , tex2D( _OcclusionMap, uv_OcclusionMap ).r , _OcclusionStrength);
    float4 MainTexture364 = ( _Color * tex2DNode362 * appendResult1656 );
    ```
*   AO 直接乘在 Albedo 上(`MainTexture364`),这意味着它会变相加深漫反射颜色,也会影响后续的 Posterize 或 Ramp 计算(因为它改变了底色亮度)。这有助于强调模型凹陷处的结构感。

## 4. Adaptive Screen UVs (自适应屏幕 UV)

在处理屏幕空间纹理(如 Halftone, Hatching)时,Shader 提供了 `_UseAdaptiveScreenUvs` 选项。
*   **问题**: 屏幕空间纹理通常是“贴”在屏幕上的,当物体移动时,纹理就像投影仪一样投在物体上,产生“滑步”现象(Shower Door Effect)。
*   **解决**: 虽然完全解决需要复杂的 Object Space 映射,但 Adaptive UV 尝试通过修正 Tiling 和 Scale (`_MaxScaleDependingOnCamera`) 来缓解透视带来的纹理密度不一致问题。
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