Back to videos

How to create animated shaders with three.js

Overview

Welcome to this exciting tutorial where we dive into the world of animated material shaders using Three.js and React Three Fiber. Shaders are essential components for creating stunning visual effects, and in this tutorial, we will explore how to create custom shaders for animated decals, similar to those you see in the game Rocket League, on a Tesla Cybertruck model.

Enhancing 3D Web Projects with Custom Shaders

Shaders play a crucial role in modern 3D graphics and are used in many real-world applications. For instance, imagine you're working on a 3D web project, such as a game or a virtual showroom. You want to add interactive, animated effects to the surfaces of 3D models, such as decals, moving patterns, or even dynamic textures that respond to the user's actions.

Insights and Skills

In this tutorial, you'll gain hands-on experience with:

  • What Shaders Are: Learn the basics of shaders and how they affect the appearance of 3D objects in your scene.

  • Creating Custom Shaders: Discover how to create your own shaders using Three.js and GLSL (OpenGL Shading Language).

  • Using Leva for Real-Time Adjustments: Learn how to control shader parameters dynamically with Leva, making it easier to tweak effects on the fly.

  • Animating Shaders: Understand how to animate shader parameters, creating moving patterns like the animated decals we’ll create for the Cybertruck.

Tech Stack

  • React Three Fiber

  • Three.js

  • GLSL

  • Leva

Demo & Code link

Resources

#threejs #react #r3f

Need help with this tutorial? Join our Discord community!