What problem does it solve?
Custom visual effects in Three.js often stall because you need to correctly wire GLSL shaders, uniforms, varyings, and material configuration to get predictable rendering results.
Core Features & Use Cases
- ShaderMaterial & RawShaderMaterial Patterns: Choose the right material type depending on whether you want Three.js-provided uniforms/attributes or full GLSL control.
- Uniforms, Varyings, and GLSL Patterns: Implement time-based animation, texture sampling, vertex displacement, gradients, noise functions, and lighting/edge effects using consistent shader structure.
- Extending and Debugging Materials: Inject shader code via onBeforeCompile for built-in materials and debug rendering by inspecting compiled shader source or visualizing intermediate values.
Use Case: You are creating an interactive product visualization with animated dissolves and rim lighting, and you need a reliable way to define uniforms, pass data between vertex and fragment shaders, and update values every frame.
Quick Start
Use the threejs-shaders skill to implement a basic animated fragment shader by setting a time uniform and updating it in your render loop.