graphics-rendering
3D graphics, shaders, VFX, lighting, rendering optimization. Create stunning visuals with production-ready techniques.
What this skill does
# Graphics & Rendering
## Rendering Pipeline
```
┌─────────────────────────────────────────────────────────────┐
│ RENDERING PIPELINE │
├─────────────────────────────────────────────────────────────┤
│ VERTEX STAGE: │
│ Model Space → World Space → View Space → Clip Space │
│ ↓ │
│ RASTERIZATION: Triangles → Fragments │
│ ↓ │
│ FRAGMENT STAGE: Color, Lighting, Texturing │
│ ↓ │
│ OUTPUT: Final pixel color to framebuffer │
└─────────────────────────────────────────────────────────────┘
```
## Shader Programming
### Standard PBR Shader (HLSL)
```hlsl
// ✅ Production-Ready: PBR Surface Shader
struct SurfaceData
{
float3 Albedo;
float3 Normal;
float Metallic;
float Roughness;
float AO;
};
float3 FresnelSchlick(float cosTheta, float3 F0)
{
return F0 + (1.0 - F0) * pow(1.0 - cosTheta, 5.0);
}
float DistributionGGX(float3 N, float3 H, float roughness)
{
float a = roughness * roughness;
float a2 = a * a;
float NdotH = max(dot(N, H), 0.0);
float NdotH2 = NdotH * NdotH;
float denom = (NdotH2 * (a2 - 1.0) + 1.0);
return a2 / (PI * denom * denom);
}
float4 PBRLighting(SurfaceData surface, float3 viewDir, float3 lightDir)
{
float3 H = normalize(viewDir + lightDir);
float3 F0 = lerp(0.04, surface.Albedo, surface.Metallic);
float D = DistributionGGX(surface.Normal, H, surface.Roughness);
float3 F = FresnelSchlick(max(dot(H, viewDir), 0.0), F0);
float3 diffuse = surface.Albedo * (1.0 - surface.Metallic);
float3 specular = D * F;
return float4((diffuse + specular) * surface.AO, 1.0);
}
```
### Toon/Cel Shader
```hlsl
// ✅ Production-Ready: Toon Shader
float4 ToonShading(float3 normal, float3 lightDir, float4 baseColor)
{
float NdotL = dot(normal, lightDir);
// Step function for cel shading
float toonRamp;
if (NdotL > 0.7) toonRamp = 1.0;
else if (NdotL > 0.3) toonRamp = 0.6;
else if (NdotL > 0.0) toonRamp = 0.3;
else toonRamp = 0.1;
return baseColor * toonRamp;
}
// Outline pass (inverted hull method)
float4 OutlineVertex(float4 position, float3 normal, float outlineWidth)
{
position.xyz += normal * outlineWidth;
return position;
}
```
## Visual Effects (VFX)
### Particle System Setup
```
PARTICLE SYSTEM ARCHITECTURE:
┌─────────────────────────────────────────────────────────────┐
│ EMITTER: Rate, Bursts, Shape │
│ ↓ │
│ SPAWN: Initial velocity, Size, Color, Lifetime │
│ ↓ │
│ UPDATE: Forces, Collisions, Color over life │
│ ↓ │
│ RENDER: Billboard, Mesh, Trail │
└─────────────────────────────────────────────────────────────┘
COMMON VFX RECIPES:
┌────────────────┬────────────────────────────────────────────┐
│ Fire │ Orange→Yellow gradient, upward velocity │
│ Smoke │ Gray billboards, turbulence noise │
│ Sparks │ Point emitter, gravity, short lifetime │
│ Magic │ Spiral path, glow, color cycling │
│ Blood │ Burst, gravity, decal on collision │
└────────────────┴────────────────────────────────────────────┘
```
## Optimization Techniques
| Technique | Draw Call Reduction | When to Use |
|-----------|---------------------|-------------|
| Static Batching | 90%+ | Static geometry |
| Dynamic Batching | 50-80% | Small moving objects |
| GPU Instancing | 95%+ | Many identical objects |
| LOD System | 40-60% | Distant objects |
| Occlusion Culling | 30-70% | Indoor scenes |
### LOD Configuration
```
LOD DISTANCE SETUP:
┌─────────────────────────────────────────────────────────────┐
│ LOD0 (100% tris): 0-20m → Full detail │
│ LOD1 (50% tris): 20-50m → Reduced detail │
│ LOD2 (25% tris): 50-100m → Low detail │
│ LOD3 (10% tris): 100m+ → Billboard/Impostor │
└─────────────────────────────────────────────────────────────┘
```
## 🔧 Troubleshooting
```
┌─────────────────────────────────────────────────────────────┐
│ PROBLEM: Too many draw calls (>2000) │
├─────────────────────────────────────────────────────────────┤
│ SOLUTIONS: │
│ → Enable GPU instancing for repeated objects │
│ → Use texture atlases │
│ → Merge static meshes │
│ → Implement LOD system │
└─────────────────────────────────────────────────────────────┘
┌─────────────────────────────────────────────────────────────┐
│ PROBLEM: Shader artifacts / visual glitches │
├─────────────────────────────────────────────────────────────┤
│ SOLUTIONS: │
│ → Check for division by zero │
│ → Validate normal vectors │
│ → Use saturate() on color outputs │
│ → Check texture sampling modes │
└─────────────────────────────────────────────────────────────┘
```
## Platform Guidelines
| Platform | Max Draw Calls | Shader Complexity | Texture Size |
|----------|----------------|-------------------|--------------|
| Mobile | 100-200 | Low | 1024px max |
| Console | 2000-3000 | High | 4096px |
| PC | 3000-5000 | Very High | 8192px |
| VR | 100-150 | Low | 2048px |
---
**Use this skill**: When creating shaders, optimizing visuals, or implementing effects.
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.