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/PoiyomiShaders/Details/01_Base_Main.md

View on GitHub
# Base & Main Features

This document details the base appearance and geometry manipulation features of the Poiyomi Toon Shader.

## 1. Main Appearance
The core visual settings found in the "Main" section.

### Properties
*   **Color & Texture**:
    *   `_Color`: Base color tint.
    *   **`_MainTex`**: Base Albedo texture.
    *   **`_BumpMap`**: Normal map.
    *   **`_BumpScale`**: Normal map intensity.
    *   **`_Cutoff`**: Alpha cutoff threshold (for Cutout mode).
    *   **`_AlphaMod`**: Global alpha modifier.
*   **Color Adjust**:
    *   **`_MainHueShift`**: Hue shift amount (0-1).
    *   **`_Saturation`**: Saturation adjustment (-1 to 1).
    *   **`_MainBrightness`**: Brightness multiplier.

### Implementation Call
**Fragment Shader**: `frag` function in `Poiyomi.shader`.
The base color is sampled and adjusted early in the fragment pipeline.

**Pseudo-Code:**
```hlsl
float4 mainTexture = SampleTexture(_MainTex, uv);
float3 baseColor = mainTexture.rgb * _Color.rgb;

// Hue Shift
baseColor = HueShift(baseColor, _MainHueShift);

// Saturation/Brightness
baseColor = AdjustSaturation(baseColor, _Saturation);
baseColor *= _MainBrightness;
```

## 2. Vertex Manipulation
Geometric deformations applied in the Vertex Shader. This allows for animating the mesh without changing the actual model data.

### Properties
*   **Translation**: `_VertexManipulationLocalTranslation`, `_VertexManipulationWorldTranslation`.
*   **Rotation**: `_VertexManipulationLocalRotation` (Euler angles), `_VertexManipulationLocalRotationSpeed`.
*   **Scale**: `_VertexManipulationLocalScale`.
*   **Rounding**: `_VertexRoundingEnabled`, `_VertexRoundingDivision` (Grid size for retro effect).
*   **Distortion**: `_VertexBarrelMode`, `_VertexSphereMode`.

### Implementation Call
**Vertex Shader**: `vert` function in `Poiyomi.shader` (approx line 8920).

**Core Logic (Pseudo-code):**
```hlsl
VertexOut vert(appdata v) {
    // 1. AudioLink Data Retrieval
    float4 bands = GetAudioLinkBands();
    
    // 2. Calculate Offsets
    float3 translation = _VertexManipulationLocalTranslation;
    float3 rotation = _VertexManipulationLocalRotation;
    
    if (_VertexAudioLinkEnabled) {
        // AudioLink modifies the base transformation values
        translation += lerp(_VertexLocalTranslationALMin, _VertexLocalTranslationALMax, bands[BandIndex]);
        rotation += bands[RotBand] * _VertexLocalRotationAL;
    }
    
    // 3. Apply Rotation & Translation
    // Rotate around pivot (usually object center)
    v.vertex = Rotate(v.vertex, rotation);
    v.vertex.xyz += translation;
    
    // 4. Barrel/Sphere Distortion
    if (_VertexBarrelMode) {
        // Distort XZ based on height or distance
        v.vertex.xz = DistortBarrel(v.vertex.xz, _VertexBarrelWidth);
    }
    
    // 5. Rounding (Retro Effect)
    if (_VertexRoundingEnabled) {
        float grid = _VertexRoundingDivision;
        // Snap vertex positions to the nearest grid point
        v.vertex.xyz = ceil(v.vertex.xyz / grid) * grid;
    }
    
    return o;
}
```

## 3. Vertex Glitching
Simulates digital artifacts by displacing vertices randomly or based on a texture.

### Properties
*   **`_VertexGlitchStrength`**: Intensity of the glitch displacement.
*   **`_VertexGlitchFrequency`**: Speed of the jitter animation.
*   **`_VertexGlitchThreshold`**: Cutoff value to make glitching intermittent.
*   **`_VertexGlitchMap`**: Optional texture to mask where glitches happen.

### Principles & Math
Uses a noise function based on time and vertex position (`_Time.y` and `worldPos.y`) to generate a random offset vector.

### Implementation
**Pseudo-Code:**
```hlsl
if (_VertexGlitchingEnabled) {
    // Generate noise based on time and position
    float time = _Time.y * _VertexGlitchFrequency;
    float noise = sin(dot(worldPos.y, 12.9898)) + sin(time);
    
    // Threshold check
    if (noise > _VertexGlitchThreshold) {
        // Calculate offset direction (orthogonal to view)
        float3 direction = normalize(cross(ViewDir, Up));
        
        // Apply offset
        float3 offset = direction * _VertexGlitchStrength;
        
        // AudioLink Modulation
        if (_VertexAudioLinkEnabled) {
            offset *= AudioLinkData(Band).r;
        }
        
        v.vertex.xyz += offset;
    }
}
```

## 4. Dissolve
Poiyomi supports advanced dissolve effects, including "UV Tile Dissolve".

### Properties
*   **`_UVTileDissolveEnabled`**: Toggle for tile-based dissolve.
*   **`_DissolveAlpha`**: Progress of the dissolve.

### Implementation
**Vertex Discard Logic:**
```hlsl
if (_UVTileDissolveEnabled) {
    // Quantize UVs to create "tiles"
    float2 tileUV = floor(v.uv * GridSize);
    
    // Sample noise for this tile
    float noise = SampleNoise(tileUV);
    
    // Discard entire tile if below threshold
    if (noise < _DissolveAlpha) {
        return NAN; // Discard vertex by returning NaN position
    }
}
```
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