In this coding tutorial, we go over how to properly write Three.js GLSL shaders in Visual Studio Code. We start off by setting up our VS Code environment with the WebGL GLSL extension. Then, we refactor our vertex + fragment shader code into GLSL formatted files to get syntax highlighting and auto-suggestions. Finally, we go over how to set up the Vite.js plugin to import our GLSL code into JavaScript.
📖 Code - https://github.com/SuboptimalEng/thre...
🎥 YouTube - / suboptimaleng
💻 GitHub - https://github.com/SuboptimalEng
🐦 Twitter - / suboptimaleng
🧵 Threads - https://www.threads.net/@suboptimaleng
📸 Instagram - / suboptimaleng
== [ Resources ] ==
Three.js - https://threejs.org
Three.js Tutorials - https://sbcode.net/threejs
Discover Three.js - https://discoverthreejs.com
== [ Timestamps ] ==
00:00 Intro to Three.js Shaders
00:44 VS Code GLSL Extension
01:59 Import GLSL Files in JavaScript
02:30 Vite GLSL Plugin Setup Guide
== [ Tags ] ==
#suboptimal #threejs #shaders