KroneCorylus/ghostty-shader-playground
关于
用于学习和开发着色器的个人空间
学习与教育实测星标增长
- 24小时
- +1
- 7天
- +4
- 15天
- +7
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文Ghostty Shader Playground
A web-based playground for creating and testing shaders for the Ghostty terminal.
https://github.com/user-attachments/assets/32758e20-1056-42cd-b98b-abea48a776f1
Getting Started
Prerequisites
- Node.js (for running the development server)
Installation
- Clone or download this repository.
- Install dependencies:
npm install
Running
Start the development server and open your browser automatically:
npm startOr manually:
node server.jsThen open
http://localhost:3000in your browser.
The server provides:
- Static file serving for HTML, JS, and GLSL files
/shaders-listendpoint that returns available shader files- WebSocket server for live reload functionality
- File watching that automatically reloads the page when shaders or other files change
Usage
- Start the server and edit or create shaders inside the
public/shadersdirectory with your favorite editor/IDE.
Watch them refresh automatically in the browser for faster development. - Use the toolbar at the bottom to:
- Change cursor type (block, vertical bar, horizontal bar)
- Switch between AUTO, RND, and CLICK cursor movement modes
- Pick a cursor color (mapped to uniform iCurrentCursorColor)
- Click on a canvas (in CLICK mode) to move the cursor.
- Use the dropdown on each canvas to switch shaders.
- You can use the keyboard arrows, Enter, and Backspace to move the cursor as well.
https://github.com/user-attachments/assets/7a9cc545-0708-4a42-81ee-d1a28e005f4f
Contributing Shaders
Feel free to make a pull request to add your shader in the shaders/ directory!
Community contributions are welcome and appreciated.
Developing Shaders
- Add your own shaders to the
shaders/directory; they will automatically appear in the dropdown menus. - The server automatically watches for file changes and reloads the page when you modify shaders or other files.
Acknowledgements
Special thanks to patriciogonzalezvivo for his library glslCanvas.
Although this project now uses a rewritten implementation to support WebGL2 and different default uniforms, his work made it possible, and several functions are directly copied from his library.
License
MIT License. See LICENSE file for details.
探索相关项目
加载中…