Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pema99/glsl2hlsl
Shadertoy to Unity shader converter
https://github.com/pema99/glsl2hlsl
Last synced: about 1 month ago
JSON representation
Shadertoy to Unity shader converter
- Host: GitHub
- URL: https://github.com/pema99/glsl2hlsl
- Owner: pema99
- Created: 2021-06-09T02:59:42.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-02-11T23:21:44.000Z (11 months ago)
- Last Synced: 2024-08-03T19:08:05.382Z (5 months ago)
- Language: Rust
- Homepage:
- Size: 163 KB
- Stars: 76
- Watchers: 6
- Forks: 12
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-vrchat - glsl2hlsl - WIP shadertoy to Unity converter (Tutorials / Shaders)
README
# [Online demo here (pema99.github.io/glsl2hlsl)](https://pema99.github.io/glsl2hlsl)
# glsl2hlsl
Slightly cursed WIP ShaderToy to Unity (ShaderLab) transpiler.Sorry if the code gives you an aneurism.
# Features
- Converts a fairly decent chunk of shadertoy shaders to usable unity shaders
- Can attempt to automatically find and extract properties from the shader and put then in the inspector
- Can attempt to automatically make raymarched/raytraced shaders 3D
- Can download shaders directly from the shadertoy API given a link
- Synthesizes a usable unity material and .meta file when using download feature# Some cool shaders to try it on
[Fractal land by Kali](https://www.shadertoy.com/view/XsBXWt)[Protean clouds by IQ](https://www.shadertoy.com/view/3l23Rh)
[Fractal pyramid by bradjamesgrant](https://www.shadertoy.com/view/tsXBzS)
[Phantom star by kasari39](https://www.shadertoy.com/view/ttKGDt)
# To do
- Better support for preprocessor directives in any context
- Multiline macro support
- Implement various missing sampler-related functions such as textureSize, textureLodOffset etc.
- A few properties defined by shadertoy (iDate, iChannelResolution...) are missing
- Refactor# Build
`cargo build`# Usage
`glsl2hlsl `Or just use the website :P