一键导入
godot-shader
Godot shader specialist for Godot shading language, visual shaders, particles, post-processing, and rendering optimization.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Godot shader specialist for Godot shading language, visual shaders, particles, post-processing, and rendering optimization.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | godot-shader |
| description | Godot shader specialist for Godot shading language, visual shaders, particles, post-processing, and rendering optimization. |
| license | MIT |
This skill provides expert guidance for shaders, VFX, and rendering in Godot 4.
Use this skill when:
| Type | Use Case |
|---|---|
spatial | 3D objects, materials, surfaces |
canvas_item | 2D sprites, UI, Canvas layers |
particles | GPU particle processing |
sky | Sky rendering, atmosphere |
fog | Volumetric fog effects |
shader_type spatial;
// Vertex processor
void vertex() {
// Modify VERTEX, NORMAL, UV, etc.
}
// Fragment processor
void fragment() {
// Modify ALBEDO, METALLIC, ROUGHNESS, NORMAL_MAP, etc.
}
// Light processor (optional)
void light() {
// Modify DIFFUSE_LIGHT, SPECULAR_LIGHT
}
shader_type canvas_item;
void vertex() {
// Modify VERTEX, COLOR, UV
}
void fragment() {
// Modify COLOR, modify texture output
}
void light() {
// 2D lighting (optional)
}
| Variable | Type | Purpose |
|---|---|---|
VERTEX | vec3 | World-space vertex position |
NORMAL | vec3 | Vertex normal |
UV / UV2 | vec2 | Texture coordinates |
ALBEDO | vec3 | Base color |
METALLIC | float | Metalness factor |
ROUGHNESS | float | Surface roughness |
NORMAL_MAP | vec3 | Tangent-space normal |
EMISSION | vec3 | Self-illumination |
AO | float | Ambient occlusion |
SSS_STRENGTH | float | Subsurface scattering |
| Variable | Type | Purpose |
|---|---|---|
VERTEX | vec2 | Screen-space position |
COLOR | vec4 | Vertex color |
UV | vec2 | Texture coordinates |
TEXTURE | sampler2D | Source texture |
TIME | float | Elapsed time |
// Basic uniforms
uniform vec4 color : source_color = vec4(1.0);
uniform float intensity : hint_range(0.0, 1.0) = 0.5;
uniform sampler2D texture_map : hint_albedo;
// Texture hints
hint_albedo // Color/opacity texture
hint_normal // Normal map
hint_roughness // Roughness map
hint_metallic // Metallic map
hint_default_black // Black default
hint_default_white // White default
shader_type spatial;
uniform float dissolve_amount : hint_range(0.0, 1.0) = 0.0;
uniform sampler2D dissolve_texture;
void fragment() {
float dissolve = texture(dissolve_texture, UV).r;
if (dissolve < dissolve_amount) {
ALPHA = 0.0;
}
}
shader_type canvas_item;
uniform vec4 outline_color : source_color = vec4(1.0, 0.0, 0.0, 1.0);
uniform float outline_width = 2.0;
void fragment() {
vec2 size = TEXTURE_PIXEL_SIZE * outline_width;
vec4 sprite_color = texture(TEXTURE, UV);
float alpha = -4.0 * sprite_color.a;
alpha += texture(TEXTURE, UV + vec2(size.x, 0.0)).a;
alpha += texture(TEXTURE, UV - vec2(size.x, 0.0)).a;
alpha += texture(TEXTURE, UV + vec2(0.0, size.y)).a;
alpha += texture(TEXTURE, UV - vec2(0.0, size.y)).a;
COLOR = mix(sprite_color, outline_color, alpha);
}
shader_type spatial;
uniform float wave_speed = 1.0;
uniform float wave_amplitude = 0.1;
uniform vec2 wave_direction = vec2(1.0, 0.0);
void vertex() {
float wave = sin(TIME * wave_speed + VERTEX.x * wave_direction.x + VERTEX.z * wave_direction.y);
VERTEX.y += wave * wave_amplitude;
}
shader_type particles;
// Process particles on GPU
void start() {
// Initial particle setup
COLOR = vec4(1.0);
TRANSFORM[3].xyz = EMISSION_TRANSFORM[3].xyz;
}
void process() {
// Update each frame
COLOR.a -= 0.1 * DELTA;
TRANSFORM[3].xyz += VELOCITY * DELTA;
}
For non-programmers or prototyping:
ShaderMaterial in inspectormediump for mobilerender_mode blend_add, unshaded, cull_disabled;
// Use lower precision for mobile
uniform lowp vec4 color : source_color;
Godot 4 post-processing via Compositor:
CompositorEffectshader_type declarationTIME updates (effects won't animate)# Set shader parameter from code
material.set_shader_parameter("dissolve_amount", 0.5)
material.set_shader_parameter("outline_color", Color.RED)
# Access shader material
var shader_mat = $Sprite.material as ShaderMaterial
shader_mat.set_shader_parameter("intensity", 0.8)
.opencode/docs/engine-reference/godot/VERSION.mdThe Godot Engine Specialist is the authority on all Godot-specific patterns, APIs, and optimization techniques. Guides C# (primary) vs GDScript (optional) vs GDExtension decisions, ensures proper use of Godot's node/scene architecture, signals, and resources.
快速恢复项目上下文 — 新会话中读取已有配置,无需重新走 /start 流程。
First-time onboarding — asks where you are, then guides you to the right workflow. No assumptions.
引导式美术圣经编写。创建视觉规范文档,作为所有资产制作的基础。在 /brainstorm 完成后、/map-systems 或 GDD 编写之前运行。
美术与程序协调桥梁。处理资产规格、命名规范、导入管道和美术-程序沟通。
从 GDD、关卡文档或角色档案生成资产规格。包含 AI 图像生成提示词和详细规格。在美术圣经和 GDD 批准后、制作开始前运行。