More experimentation with TSL.
Simple Particles and associated geometry handled in a compute shader with TSL.
And a lot of post processing with the provided nodes
Visit https://ulucode.com/random/webgputests/linked/ to play! Requires a browser with WebGPU support.
The important code, regarding TSL /src/lib/elements/LinkedParticles.ts The file is commented and uses mostly descriptive variable names.
To start the development environment for this project, follow these steps:
- Clone the repository to your local machine:
git clone https://github.com/ULuIQ12/webgpu-tsl-linkedparticles.git
- Navigate to the project directory:
cd webgpu-tsl-linkedparticles
- Install the dependencies:
npm install
- Start the development server:
npm run dev
This will start the development server and open the project in your default browser.
-
Edit the base path in vite.config.ts
-
To build the project for production, run the following command:
npm run build
This will create an optimized build of the project in the dist
directory.
- Uses Three.js https://threejs.org/
- Built with Vite https://vitejs.dev/
- UI Management uses LilGui and a bit of React https://react.dev/
- SDF functions and other utilities from Inigo Quilez https://iquilezles.org/
- Three.js WebGPU examples : https://threejs.org/examples/?q=webgpu
- Three.js TSL documentation : https://github.com/mrdoob/three.js/wiki/Three.js-Shading-Language