Remix.run Logo
mitchellh 5 hours ago

It's maybe possible. Custom shaders are OpenGL syntax so it'd require transforming them to something compatible with WebGL/WebGPU. In Ghostty GUI we use spire-cross and glslang to transpile shaders at runtime from OpenGL to Metal or OpenGL (with features our host supports).

We'd have to look and see if these support WebGL/GPU. The next problem would be making all that fit into the wasm blob.

Or, we may be able to skip most of this is the OpenGL syntax we use is already compatible. Then no transpiling necessary...

VikingCoder 4 hours ago | parent [-]

So now let's get ShaderGlass [1] and this to have a baby, so we can have cool-retro-term [2] in the browser.

[1] https://github.com/mausimus/ShaderGlass

[2] https://github.com/Swordfish90/cool-retro-term