zhangyahan / orillusion-webgpu-samples

Basic WebGPU samples from Orillusion

Home Page:https://orillusion.github.io/orillusion-webgpu-samples/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cover Art

Orillusion-webgpu-samples

Install and Run

Type the following in any terminal:

# Clone the repo
git clone https://github.com/Orillusion/orillusion-webgpu-samples.git

# Go inside the folder
cd orillusion-webgpu-samples

# Start installing dependencies
npm install #or yarn

# Run project at localhost:3000
npm run dev #or yarn run dev

Project Layout

β”œβ”€ πŸ“‚ node_modules/   # Dependencies
β”‚  β”œβ”€ πŸ“ @webgpu      # WebGPU types for TS
β”‚  └─ πŸ“ ...          # Other dependencies (TypeScript, Vite, etc.)
β”œβ”€ πŸ“‚ src/            # Source files
β”‚  β”œβ”€ πŸ“ shaders      # Folder for shader files
β”‚  └─ πŸ“„ *.ts         # TS files for each demo
β”œβ”€ πŸ“‚ samples/        # Sample html
β”‚  └─ πŸ“„ *.html       # HTML entry for each demo
β”œβ”€ πŸ“„ .gitignore      # Ignore certain files in git repo
β”œβ”€ πŸ“„ index.html      # Entry page
β”œβ”€ πŸ“„ LICENSE         # MIT
β”œβ”€ πŸ“„ logo.png        # Orillusion logo image
β”œβ”€ πŸ“„ package.json    # Node package file
β”œβ”€ πŸ“„ tsconfig.json   # TS configuration file
β”œβ”€ πŸ“„ vite.config.js  # vite configuration file
└─ πŸ“„ readme.md       # Read Me!

How to enable WebGPU

  1. We have embedded a WebGPU Origin-Trail token in vite.config.js, you can use WebGPU at localhost:3000 via Chrome v94-105
  2. For Edge Canary, please open edge://flags/#enable-unsafe-webgpu, and enable the flag
  3. For FireFox Nightly, please open about:config, and change dom.webgpu.enabled to true

About

Basic WebGPU samples from Orillusion

https://orillusion.github.io/orillusion-webgpu-samples/

License:Other


Languages

Language:TypeScript 97.1%Language:HTML 2.4%Language:JavaScript 0.4%Language:Shell 0.1%