Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/maeln/shdrr
A live shader compiler (using shaderc)
https://github.com/maeln/shdrr
glsl hlsl shaderc spirv
Last synced: 3 days ago
JSON representation
A live shader compiler (using shaderc)
- Host: GitHub
- URL: https://github.com/maeln/shdrr
- Owner: maeln
- License: other
- Created: 2019-07-15T13:39:03.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-08-14T07:23:02.000Z (over 5 years ago)
- Last Synced: 2024-12-19T22:39:11.008Z (20 days ago)
- Topics: glsl, hlsl, shaderc, spirv
- Language: Rust
- Homepage:
- Size: 19.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# SHDRR: Live shader compiler
[![Crates.io](https://img.shields.io/crates/v/shdrr.svg)](https://crates.io/crates/shdrr)
[![Build Status](https://travis-ci.org/maeln/shdrr.svg?branch=master)](https://travis-ci.org/maeln/shdrr)SHDRR is a live shader compiler, as in, it will automatically detect if a file changed within a directory and recompile it to SPIR-V using [shaderc](https://github.com/google/shaderc).
Right now, it detect the shader type (compute, vertex, fragment) using the file extension:
- *.cs -> compute
- *.fs -> fragment
- *.vs -> vertex## Usage
See `shdrr --help` for usage:
```
SHDRR: Live compiler for SPIRV based on shaderc.USAGE:
shdrr [FLAGS] [OPTIONS]FLAGS:
-h, --help
Prints help information-r
Look for shader file recursively-V, --version
Prints version information-v
Verbose outputOPTIONS:
-d
Directory with the shaders-e
This option let you choose the target environnement for Shaderc,
Accepted value are:
vulkan, opengl, opengl_compat [default: vulkan]
-O
The optimization level follow the ones used by shaderc:
1 or nothing is performance optimization,
0 is no optimization for debugging,
s is optimization for size. [default: 1]
-o
Output directory-s
This option let you choose the SPIR-V version to be used for the compiled shader,
Accepted value are: 1.0, 1.1, 1.2, 1.3, 1.4 [default: 1.0]
```Exemple: To compile every shader contained in the directory `./shaders/src` and its sub-directory to `.shaders/bin`, with verbosity:
`shdrr -rv -d shaders/src -o shaders/bin`
## Installation
With `cargo`:
```
cargo install shdrr
```