pn-shader-authoring

pn-shader-authoring is a skill for Cursor from perniemann/pnCore. It costs 43 tokens per session (1,076 once invoked), scanned A, original, MIT.

A guide to writing GLSL and WGSL shaders, small programs that control how 3D objects and visual effects are drawn. It covers custom materials, post-processing, lighting, noise, and signed distance field effects.

In plain words
What is it for?
Use it to create custom Three.js materials, vertex and fragment shaders, post-processing effects, WebGPU shaders, lighting models, noise effects, and shader performance fixes.
Why use it?
It helps avoid rendering errors and slow shader code by explaining how data moves through shaders and how to keep calculations and inputs under control.

Skill for Cursor

Written for Cursor: shipped in a Cursor plugin.

Part of the pn-core plugin — 133 skills, 19 commands, 9 agents, 1 MCP server shipped together

Good fit Use it to create custom Three.js materials, vertex and fragment shaders, post-processing effects, WebGPU shaders, lighting models, noise effects, and shader performance fixes.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/perniemann/pncore/pn-shader-authoring
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add perniemann/pnCore --skill pn-shader-authoring
Clone the repo
git clone --depth 1 https://github.com/perniemann/pnCore

Made for: Cursor.

Or install pn-core, the plugin that ships this one along with the rest of its 133 skills, 19 commands, 9 agents, 1 MCP server.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for pn-shader-authoring

README.md
[![agentmods](https://agentmods.dev/badge/skills/perniemann/pncore/pn-shader-authoring/github.svg)](https://agentmods.dev/skills/perniemann/pncore/pn-shader-authoring)
Your own site
<a href="https://agentmods.dev/skills/perniemann/pncore/pn-shader-authoring"><img src="https://agentmods.dev/badge/skills/perniemann/pncore/pn-shader-authoring/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for pn-shader-authoring

Your own site · 80×15
<a href="https://agentmods.dev/skills/perniemann/pncore/pn-shader-authoring"><img src="https://agentmods.dev/badge/skills/perniemann/pncore/pn-shader-authoring.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 43 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,076 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00043 $0.01076
Opus 5 $0.00022 $0.00538
Sonnet 5 $0.00009 $0.00215
Haiku 4.5 $0.00004 $0.00108

Measured 7d ago against content hash dde59b646296, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

pn-shader-authoring scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

packages/pn-core-mcp/content/skills/gamedev/pn-shader-authoring/SKILL.md · 77 lines

How it starts

The opening of the file, as written. The whole thing — 77 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Shader authoring skill

When to use

  • Writing or refactoring vertex or fragment shaders
  • Creating custom Three.js ShaderMaterial or RawShaderMaterial
  • Adding custom postprocessing passes
  • Migrating custom shaders to WebGPU (prefer TSL per pn-threejs-core for GLSL/WGSL portability)
  • Implementing noise, lighting models, or SDF effects
  • Optimizing or debugging shader performance

GLSL structure

  1. Precision: Use precision highp float; (or mediump for mobile) in fragment shaders. Vertex shaders inherit from fragment or use explicit precision.
  2. Uniforms: Declare all uniforms at top; use descriptive names. Pass only what is needed; avoid large uniform blocks when possible.
  3. Varyings: Keep varyings minimal; interpolate only necessary data (e.g. vUv, vNormal, vWorldPosition).
  4. Defines: Use #define for constants (e.g. #define PI 3.14159265). Avoid magic numbers in shader body.

Three.js ShaderMaterial patterns

  • Built-in uniforms: Three.js provides modelViewMatrix, projectionMatrix, normalMatrix, cameraPosition, etc. Use ShaderChunk or copy from Three.js examples when appropriate.
  • RawShaderMaterial: Use when you need full control (no built-in chunks). Include required attributes and uniforms manually.
  • Updating uniforms: Set uniforms in useFrame or render loop. Avoid creating new objects per frame; reuse uniform objects.
  • Texture units: Bind textures to correct units; set uniforms.map.value and uniforms.map.texelSize when needed for postprocessing.

Common patterns

Noise

  • Simplex / Perlin: Use established implementations (e.g. from Shadertoy, Inigo Quilez). Optimize for your use case (2D vs 3D).
  • FBM (Fractal Brownian Motion): Layer noise at different frequencies for terrain, clouds, or organic patterns. Control octaves and lacunarity for performance.

Lighting models

  • Phong: Ambient + diffuse (N·L) + specular (R·V)^n. Use for simple non-PBR.
  • PBR: Use physically based BRDF (e.g. Cook-Torrance) when matching Three.js PBR workflow.
  • Toon: Step or smoothstep on N·L for cel-shading. Add rim light with fresnel.

Read the full file on GitHub · 77 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 77 lines · 43 tokens per session scan A dde59b646296

Subscribe to this mod's changes

pn-shader-authoring is a skill published in the GitHub repository perniemann/pnCore (0 stars, last pushed 4d ago), licensed MIT. It adds 43 tokens to every session and 1,076 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

deepseek-harness

Use when building AI agent applications with a plugin-based architecture — Web UI, CLI, Python SDK, Cordis plugin system, multi-model orchestration. DeepSeek Harness (dsh): open-source agent harness by DeepSeek AI where everything is a plugin, powered by Cordis for spatiotemporal composability.

znlgis/opengis-skills · 68 tokens

screen-reader-testing

Test web applications with screen readers including VoiceOver, NVDA, and JAWS. Use when validating screen reader compatibility, debugging accessibility issues, or ensuring assistive technology support.

wshobson/agents · 39 tokens

threejs-fundamentals

Three.js scene setup, cameras, renderer, Object3D hierarchy, coordinate systems. Use when setting up 3D scenes, creating cameras, configuring renderers, managing object hierarchies, or working with transforms.

calesthio/OpenMontage · 51 tokens

onejs-setup-and-overview

Use this skill whenever the user wants to build or set up user interface in a Unity project using OneJS, React, TypeScript, or JSX, e.g. 'add a main menu to my game', 'build a settings screen', 'make a HUD', 'set up OneJS', 'my OneJS panel is blank', 'the UI is not hot reloading'. Covers confirming OneJS is installed…

Singtaa/OneJS · 199 tokens

apply-mantel-styles

Provides guidelines for applying Mantel's brand styles to diagrams and frontend components. Use when asked to create visuals that need to align with Mantel's branding.

sammcj/agentic-coding · 37 tokens

opengeni-sites

Build, inspect, edit, validate, and publish OpenGeni Sites as ordinary Bun + React source projects compiled to one self-contained HTML artifact. Use for interactive pages, dashboards, visualizations, workflows, and focused apps that may call workspace tools through the typed Site bridge.

Cloudgeni-ai/opengeni · 60 tokens