Agent skill

Vtj Shader Development

by hexianWeb in hexianWeb/Third-Person-MC

Creates custom GLSL shaders with vite-plugin-glsl. An agent skill from hexianWeb/Third-Person-MC.

MITAuto-check passedGame Development

Install Vtj Shader Development

skills CLI
$ npx skills add hexianWeb/Third-Person-MC --skill vtj-shader-development -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install hexianWeb/Third-Person-MC vtj-shader-development --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/hexianWeb/Third-Person-MC.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agent/skills/vtj-shader-development .claude/skills/vtj-shader-development && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
vtj-shader-development
GitHub stars
194
Token cost
~2k tokens
SKILL.md length
138 words
Files
1
Skills in repo
12
Repo updated
First seen
Licence
MIT

At a glance

Creates custom GLSL shaders with vite-plugin-glsl. An agent skill from hexianWeb/Third-Person-MC.

  • Writing vertex/fragment shaders
  • SKILL.md covers Overview, When to Use, 目录结构 and 导入着色器, plus 7 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Managing uniforms

What it does

Vtj Shader Development is an agent skill from hexianWeb/Third-Person-MC. Creates custom GLSL shaders with vite-plugin-glsl. Use when writing vertex/fragment shaders, managing uniforms, or adding ShaderMaterial debug panels.

Its SKILL.md is about 2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Game Development, covering Shaders. It works with Vite and Three.js. The repository describes itself as: Three.js web version Minecraft in browser. The licence is MIT.

When your agent uses it

  • Writing vertex/fragment shaders
  • Managing uniforms
  • Adding ShaderMaterial debug panels

Example prompts

  • “Use the vtj-shader-development skill to create custom GLSL shaders with vite-plugin-glsl. An agent skill from hexianWeb/Third-Person-MC”
  • “/vtj-shader-development”

What it can do on your machine

Read from SKILL.md and the folder at commit 490203c. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are javascript and glsl).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Vtj Shader Development loads about 2k tokens when it runs. Until then it costs about 43 tokens; SKILL.md has 138 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~43
When it runs · the whole SKILL.md, loaded when a task matches
~2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from hexianWeb/Third-Person-MC at commit 490203c, republished under its MIT licence (© hexianWeb). 138 words, ~1,964 tokens.

Download SKILL.mdSave it as .claude/skills/vtj-shader-development/SKILL.md (or your agent's skills folder).
name
vtj-shader-development
description
Creates custom GLSL shaders with vite-plugin-glsl. Use when writing vertex/fragment shaders, managing uniforms, or adding ShaderMaterial debug panels.

vite-threejs Shader Development

Overview

本项目使用 vite-plugin-glsl 支持 GLSL 文件导入,着色器存放在 src/shaders/ 目录。

核心原则:所有着色器必须存放在 shaders 目录,所有 uniform 必须有调试面板。

When to Use

  • 创建自定义着色器效果
  • 修改现有着色器
  • 添加后处理效果
  • 需要理解着色器导入和 uniform 管理

目录结构

src/shaders/
├── includes/              # 共享工具函数
│   ├── ambientLight.glsl
│   ├── directionalLight.glsl
│   └── pointLight.glsl
├── sky/                   # 天空盒
│   ├── vertex.glsl
│   └── fragment.glsl
├── speedlines/            # 后处理:速度线
│   ├── vertex.glsl
│   └── fragment.glsl
├── blocks/                # 方块着色器
│   ├── ao.vert.glsl       # 环境光遮蔽
│   ├── ao.frag.glsl
│   ├── mining.vert.glsl   # 挖掘效果
│   ├── mining.frag.glsl
│   └── wind.vert.glsl     # 植物风动
├── glass/                 # 玻璃折射
├── halftone/              # 半调渲染
└── grid/                  # 调试网格

导入着色器

vite.config.js 配置
javascript
import glsl from 'vite-plugin-glsl'

export default {
  plugins: [
    glsl(),  // 启用 .glsl 文件导入
  ],
}
导入方式
javascript
// 使用路径别名(推荐)
import skyFragment from '@/shaders/sky/fragment.glsl'
import skyVertex from '@/shaders/sky/vertex.glsl'

// 或相对路径
import speedLinesFragment from '../shaders/speedlines/fragment.glsl'

ShaderMaterial 模式

基础 ShaderMaterial
javascript
import fragmentShader from '@/shaders/effect/fragment.glsl'
import vertexShader from '@/shaders/effect/vertex.glsl'

export default class EffectMesh {
  constructor() {
    this.experience = new Experience()
    this.scene = this.experience.scene
    this.debug = this.experience.debug
    
    // Shader 配置参数
    this.config = {
      color: { r: 255, g: 255, b: 255 },
      intensity: 1.0,
      speed: 1.0,
    }
    
    this._createMaterial()
    this._createMesh()
    
    if (this.debug.active) {
      this.debugInit()
    }
  }
  
  _createMaterial() {
    this.material = new THREE.ShaderMaterial({
      uniforms: {
        uTime: { value: 0 },
        uColor: { value: new THREE.Color(1, 1, 1) },
        uIntensity: { value: 1.0 },
        uTexture: { value: null },
      },
      vertexShader,
      fragmentShader,
      transparent: true,
      side: THREE.DoubleSide,
    })
  }
  
  update() {
    const elapsed = this.experience.time.elapsed
    this.material.uniforms.uTime.value = elapsed * 0.001
  }
  
  // 必须实现调试面板!
  debugInit() {
    this.debugFolder = this.debug.ui.addFolder({
      title: 'Effect Shader',
      expanded: false,
    })
    
    // 颜色 uniform 使用 view: 'color'
    this.debugFolder.addBinding(this.config, 'color', {
      label: 'Color',
      view: 'color',
    }).on('change', (ev) => {
      this.material.uniforms.uColor.value.setRGB(
        ev.value.r / 255,
        ev.value.g / 255,
        ev.value.b / 255
      )
    })
    
    // 数值 uniform 使用 addBinding
    this.debugFolder.addBinding(this.config, 'intensity', {
      label: 'Intensity',
      min: 0, max: 2, step: 0.01,
    }).on('change', (ev) => {
      this.material.uniforms.uIntensity.value = ev.value
    })
  }
  
  destroy() {
    this.material.dispose()
    // ...
  }
}
后处理 ShaderPass
javascript
import { ShaderPass } from 'three/examples/jsm/postprocessing/ShaderPass.js'
import fragmentShader from '@/shaders/effect/fragment.glsl'
import vertexShader from '@/shaders/effect/vertex.glsl'

// 在 Renderer 中
this.effectPass = new ShaderPass({
  uniforms: {
    tDiffuse: { value: null },  // 必需:接收上一个 pass 的输出
    uTime: { value: 0 },
    uOpacity: { value: 1.0 },
  },
  vertexShader,
  fragmentShader,
})
this.composer.addPass(this.effectPass)

GLSL 代码规范

标准结构
glsl
// ===== Uniforms =====
uniform float uTime;
uniform vec3 uColor;
uniform sampler2D uTexture;

// ===== Varyings =====
varying vec2 vUv;
varying vec3 vNormal;
varying vec3 vPosition;

// ===== Helper Functions =====
float random(float seed) {
  return fract(sin(seed) * 43758.5453);
}

// ===== Main =====
void main() {
  // ...
  
  gl_FragColor = vec4(color, 1.0);
  
  // Three.js 色彩空间校正
  #include <tonemapping_fragment>
  #include <colorspace_fragment>
}
Include 模式

共享代码放在 includes/ 目录:

glsl
// includes/pointLight.glsl
vec3 pointLight(
  vec3 lightColor,
  float lightIntensity,
  vec3 normal,
  vec3 lightPosition,
  vec3 viewDirection,
  float specularPower,
  vec3 position,
  float lightDecay
) {
  vec3 lightDelta = lightPosition - position;
  float lightDistance = length(lightDelta);
  vec3 lightDir = normalize(lightDelta);
  
  float decay = 1.0 / (1.0 + lightDistance * lightDecay);
  float shading = max(0.0, dot(normal, lightDir));
  
  // Phong specular
  vec3 reflectDir = reflect(-lightDir, normal);
  float specular = pow(max(dot(viewDirection, reflectDir), 0.0), specularPower);
  
  return lightColor * lightIntensity * decay * (shading + specular);
}

使用 include:

glsl
// halftone/fragment.glsl
#include ../includes/ambientLight.glsl
#include ../includes/directionalLight.glsl
#include ../includes/pointLight.glsl

void main() {
  vec3 light = ambientLight(vec3(1.0), 0.2);
  light += pointLight(uLightColor, 1.0, vNormal, uLightPos, viewDir, 32.0, vPosition, 0.1);
  // ...
}

Custom Shader Material (CSM)

用于扩展标准材质(如添加 AO 到 MeshStandardMaterial):

glsl
// ao.vert.glsl - 顶点着色器
attribute float aAo;
varying float vAO;

void main() {
  vAO = 1.0 - aAo;
  
  // CSM 特殊变量:替代标准顶点变换
  csm_PositionRaw = projectionMatrix * modelViewMatrix * instanceMatrix * vec4(position, 1.0);
}
glsl
// ao.frag.glsl - 片元着色器
varying float vAO;

void main() {
  float aoFactor = mix(0.5, 1.0, vAO);
  
  // CSM 特殊变量:修改漫反射颜色
  csm_DiffuseColor.rgb *= vec3(aoFactor);
}

Uniform 类型对照

GLSL 类型JS 设置方式
float{ value: 1.0 }
vec2{ value: new THREE.Vector2(1, 1) }
vec3{ value: new THREE.Vector3(1, 1, 1) }
vec3 (颜色){ value: new THREE.Color(1, 1, 1) }
mat4{ value: new THREE.Matrix4() }
sampler2D{ value: texture }

调试面板要求(MANDATORY)

所有 ShaderMaterial 的 uniform 都必须有调试面板:

javascript
debugInit() {
  const folder = this.debug.ui.addFolder({ title: 'Shader' })
  
  // 颜色 → view: 'color'
  folder.addBinding(this.config, 'color', { view: 'color' })
  
  // 数值 → min/max/step
  folder.addBinding(this.config, 'value', { min: 0, max: 1 })
  
  // 向量 → 分轴控制或 point2d
  folder.addBinding(this.config, 'offset', {
    x: { min: -10, max: 10 },
    y: { min: -10, max: 10 },
  })
}

Common Mistakes

❌ 着色器放错位置
javascript
// BAD: 着色器在 js 目录
import shader from './world/effect.glsl'

// GOOD: 着色器在 shaders 目录
import shader from '@/shaders/effect/fragment.glsl'
❌ 缺少调试面板
javascript
// BAD: 有 uniform 但没有 debugInit
this.material = new THREE.ShaderMaterial({
  uniforms: { uIntensity: { value: 1.0 } },
  // ...
})
// 没有 debugInit() → 无法调参

// GOOD: 必须有调试面板
debugInit() {
  this.debugFolder.addBinding(this.config, 'intensity', {...})
}
❌ 颜色 uniform 不使用 view: 'color'
javascript
// BAD: 颜色使用默认控件
folder.addBinding(this.config, 'color')  // 显示为数字输入框

// GOOD: 使用颜色选择器
folder.addBinding(this.config, 'color', { view: 'color' })
❌ 忘记色彩空间校正
glsl
// BAD: 直接输出(颜色可能偏暗)
gl_FragColor = vec4(color, 1.0);

// GOOD: 添加色彩空间校正
gl_FragColor = vec4(color, 1.0);
#include <tonemapping_fragment>
#include <colorspace_fragment>

Quick Reference

需求做法
创建着色器在 src/shaders/<name>/ 创建 vertex.glsl 和 fragment.glsl
导入着色器import shader from '@/shaders/<path>.glsl'
共享代码放入 includes/,使用 #include
更新 uniformmaterial.uniforms.uValue.value = newValue
调试面板必须在 debugInit() 中为每个 uniform 创建控件
颜色控件使用 view: 'color'

© hexianWeb, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agent/skills/vtj-shader-development of hexianWeb/Third-Person-MC.

Open the folder on GitHubat commit 490203c

Compare with similar skills

Vtj Shader Development next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Vtj Shader Development compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Vtj Shader Development this skillhexianWeb/Third-Person-MC194—~2kAutomated safety check: PassMIT
New ExperimentTresjs/tres3.8k—~782Automated safety check: PassMIT
Threejs Gameplay Systemsvalkor-ai/loom1.2k1 repos~1.4kAutomated safety check: PassApache-2.0
Threejs Gameplay Systemscorosolto/client257—~1.5kAutomated safety check: PassAGPL-3.0
Vitexecpmndrs/viverse132—~2.5kAutomated safety check: PassCustom licence
Shader Extractcth9191/site-clone133—~1.4kAutomated safety check: PassMIT

Similar skills

  • New Experiment

    Tresjs/tres

    Create a new experiment in TresJS Lab with all necessary files

    3.8k GitHub stars~782 tokensUpdated today
    Game DevelopmentAuto-check passed
  • Build and iterate playable Three.js game systems: starter scaffold, architecture, design briefs, core loops, level and encounter design, entities, input, camera, collision and physics, scoring…

    1.2k GitHub starsUsed in 1 repo~1.4k tokens
    Game DevelopmentAuto-check passed
  • Threejs Gameplay Systems

    corosolto/client

    Build and iterate playable Three.js game systems. An agent skill from corosolto/client.

    257 GitHub stars~1.5k tokensUpdated today
    Game DevelopmentAuto-check passed
  • Vitexec

    pmndrs/viverse

    A skill your agent uses when an AI agent needs to inspect, verify, debug, or profile a live Vite app by running temporary snippets inside the browser page and reading browser logs or captured…

    132 GitHub stars~2.5k tokensUpdated 6 days ago
    Game DevelopmentAuto-check passed
  • Shader Extract

    cth9191/site-clone

    Extract, reproduce, and locally replay a single WebGL / WebGPU / Canvas / shader / animated-3D visual effect from a web page — the GPU-rendered surface that DOM/CSS cloning is blind to.

    133 GitHub stars~1.4k tokensUpdated 1 mo ago
    Game DevelopmentAuto-check passed
  • Typegpu

    software-mansion-labs/skills

    TypeGPU is type-safe WebGPU in TypeScript. An agent skill from software-mansion-labs/skills.

    291 GitHub starsUsed in 2 repos~5.6k tokens
    Game DevelopmentAuto-check passed

More from hexianWeb/Third-Person-MC

All 12 skills in this repo
  • Vtj Debug Panel

    hexianWeb/Third-Person-MC

    Configures Tweakpane debug panels for 3D components. An agent skill from hexianWeb/Third-Person-MC.

    194 GitHub stars~638 tokensUpdated 2 mo ago
    Auto-check passed
  • Vtj Camera System

    hexianWeb/Third-Person-MC

    Configures third-person camera systems with collision avoidance.

    194 GitHub stars~1.9k tokensUpdated 2 mo ago
    Auto-check passed
  • Vtj Component Model

    hexianWeb/Third-Person-MC

    Creates 3D components using the Experience singleton pattern.

    194 GitHub stars~1.5k tokensUpdated 2 mo ago
    Auto-check passed
  • Vtj Input System

    hexianWeb/Third-Person-MC

    Handles mouse, keyboard, and touch input via the IMouse and InputManager systems.

    194 GitHub stars~1.8k tokensUpdated 2 mo ago
    Auto-check passed
  • Vtj Performance

    hexianWeb/Third-Person-MC

    Optimizes Three.js rendering performance. An agent skill from hexianWeb/Third-Person-MC.

    194 GitHub stars~802 tokensUpdated 2 mo ago
    Auto-check passed
  • Vtj Raycasting System

    hexianWeb/Third-Person-MC

    Implements ray picking and collision detection. An agent skill from hexianWeb/Third-Person-MC.

    194 GitHub stars~2k tokensUpdated 2 mo ago
    Auto-check passed

Works with

Questions about Vtj Shader Development

What does Vtj Shader Development do?

Creates custom GLSL shaders with vite-plugin-glsl. An agent skill from hexianWeb/Third-Person-MC. Vtj Shader Development is an agent skill from hexianWeb/Third-Person-MC. Creates custom GLSL shaders with vite-plugin-glsl.

When should I use Vtj Shader Development?

Vtj Shader Development fits situations like: writing vertex/fragment shaders; managing uniforms; adding ShaderMaterial debug panels.

How do I install Vtj Shader Development in Claude Code?

Run `npx skills add hexianWeb/Third-Person-MC --skill vtj-shader-development -a claude-code`. Or copy the skill folder (.agent/skills/vtj-shader-development in hexianWeb/Third-Person-MC) into .claude/skills/vtj-shader-development in your project. Claude Code loads it when a task matches its description.

How do I install Vtj Shader Development in Codex?

Run `npx skills add hexianWeb/Third-Person-MC --skill vtj-shader-development -a codex`. Or copy the skill folder (.agent/skills/vtj-shader-development in hexianWeb/Third-Person-MC) into .agents/skills/vtj-shader-development in your project. Codex loads it when a task matches its description.

Can I use Vtj Shader Development in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add hexianWeb/Third-Person-MC --skill vtj-shader-development -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/vtj-shader-development, .gemini/skills/vtj-shader-development, .github/skills/vtj-shader-development and .opencode/skills/vtj-shader-development in your project.

What does Vtj Shader Development need to run?

SKILL.md names no scripts, command-line tools or credentials: Vtj Shader Development is instructions for the agent only.

Does Vtj Shader Development access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Vtj Shader Development safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Vtj Shader Development use?

Vtj Shader Development is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Vtj Shader Development use?

About 2k tokens (SKILL.md is roughly 7.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Vtj Shader Development?

Skills that share tags, products or a category with Vtj Shader Development: New Experiment (Tresjs/tres, 3.8k stars), Threejs Gameplay Systems (valkor-ai/loom, 1.2k stars), Threejs Gameplay Systems (corosolto/client, 257 stars) and Vitexec (pmndrs/viverse, 132 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Vtj Shader Development?

hexianWeb (a GitHub user) maintains it in hexianWeb/Third-Person-MC, which has 194 GitHub stars. The repository holds 12 skills in this directory. The repository was last updated on July 27, 2026.

Source: hexianWeb/Third-Person-MC on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.