Confirm successful installation by checking the skill directory location:
.cursor/skills/godot-shaders-basics
Restart Cursor to activate godot-shaders-basics. Access via /godot-shaders-basics in your agent's command palette.
โ
Security Notice
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your environment. Always review source, verify the publisher, and test in isolation before production.
Godot 4.3 specific full-rect shader. Handles Reversed-Z coordinate reconstruction to prevent clipping at the near plane.
NEVER Do in Shaders
NEVER use discard unconditionally for optimization โ It prevents the depth prepass from working effectively. A discarded pixel still costs vertex processing; sometimes not rendering the object is better [1].
NEVER use if/else for dynamic states in high-performance shaders โ GPUs hate branching. Use mix(), step(), and smoothstep() for mathematical, hardware-optimized selection [5, 21].
NEVER compare floats exactly โ Hardware precision varies; if (v == 0.5) is unreliable. Use abs(a - b) < epsilon or step().
NEVER use standard Alpha Blending for massive foliage โ It prevents shadows and SSR. Use Alpha Scissor or Alpha Hash (dithering) to enable depth prepass and shadow casting [7].
NEVER hardcode POSITION to vec4(VERTEX, 1.0) for full-screen quads in 4.3+ โ Godot 4.3 uses Reversed-Z depth; this will cause clipping. Use POSITION = vec4(VERTEX.xy, 1.0, 1.0) [8, 9].
NEVER duplicate materials to change one color/value on many enemies โ Use instance uniform. This allows unique values for thousands of nodes while maintaining a single draw call (batching) [10].
NEVER use TIME without a speed multiplier โ Fragment speed should be controllable via uniforms to ensure consistency across different gameplay states.
NEVER forget hint_source_color for color uniforms โ Without it, the engine treats colors as linear math, leading to incorrect gamma and washed-out visuals in the inspector.
NEVER calculate complex math in fragment() that could be in vertex() โ vertex() runs once per point; fragment() runs millions of times per frame. Interpolate values via varying instead.
NEVER use #define macros for dynamic runtime toggles โ These create new shader permutations, causing massive compilation stutters when first encountered in-game. Use uniforms instead.
NEVER forget to normalize vectors โ Using reflect(dir, normal) on unnormalized vectors causes severe rendering artifacts and incorrect lighting math.
NEVER modify UV without bounds checking or fract() โ Shifting UVs beyond 0.0-1.0 without repeat wrapping or clamping will sample edge pixels or return black, breaking texture consistency.
shader_type canvas_item;
void fragment() {
// Get texture color
vec4 tex_color = texture(TEXTURE, UV);
// Tint red
COLOR = tex_color * vec4(1.0, 0.5, 0.5, 1.0);
}
Apply to Sprite:
Select Sprite2D node
Material โ New ShaderMaterial
Shader โ New Shader
Paste code
Common 2D Effects
Dissolve Effect
shader_type canvas_item;uniformfloat dissolve_amount :hint_range(0.0,1.0)=0.0;uniformsampler2D noise_texture;voidfragment(){vec4 tex_color =texture(TEXTURE, UV);float noise =texture(noise_texture, UV).r;if(noise < dissolve_amount){discard;// Make pixel transparent} COLOR = tex_color;}
Wave Distortion
shader_type canvas_item;uniformfloat wave_speed =2.0;uniformfloat wave_amount =0.05;voidfragment(){vec2 uv = UV; uv.x +=sin(uv.y *10.0+ TIME * wave_speed)* wave_amount; COLOR =texture(TEXTURE, uv);}
shader_type canvas_item;uniformfloat vignette_strength =0.5;voidfragment(){vec4 color =texture(TEXTURE, UV);// Distance from centervec2 center =vec2(0.5,0.5);float dist =distance
Implementation Guide
Prerequisites
โบClaude Desktop or compatible AI client with skill support
โบClear understanding of task or problem to solve
โบWillingness to iterate and refine outputs
Time Estimate
15-45 minutes depending on use case complexity
Steps
1Install skill using provided installation command
2Test with simple use case relevant to your work
3Evaluate output quality and relevance
4Iterate on prompts to improve results
5Integrate into regular workflow if valuable
Common Pitfalls
โ Expecting perfect results without iteration
โ Not providing enough context in prompts
โ Using skill for tasks outside its intended scope
โ Accepting outputs without review and validation
Best Practices
โ Do
+Start with clear, specific prompts
+Provide relevant context and constraints
+Review and refine all outputs before using
+Iterate to improve output quality
+Document successful prompt patterns
โ Don't
โDon't use without understanding skill limitations
โDon't skip validation of outputs
โDon't share sensitive information in prompts
โDon't expect skill to replace human judgment
๐ก Pro Tips
โ Be specific about desired format and style
โ Ask for multiple options to choose from
โ Request explanations to understand reasoning
โ Combine AI efficiency with human expertise
When to Use This
โ Use when
Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.
โ Avoid when
Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.
Learning Path
1Familiarize yourself with skill capabilities and limitations
2Start with low-risk, non-critical tasks
3Progress to more complex and valuable use cases
4Build expertise through regular use and experimentation