Crates.io | shdrr |
lib.rs | shdrr |
version | 0.1.3 |
source | src |
created_at | 2019-07-15 14:01:21.685647 |
updated_at | 2019-08-14 07:30:05.377045 |
description | A live shader compiler using shaderc. |
homepage | |
repository | https://github.com/maeln/shdrr |
max_upload_size | |
id | 149188 |
size | 52,308 |
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.
Right now, it detect the shader type (compute, vertex, fragment) using the file extension:
*.cs -> compute
*.fs -> fragment
*.vs -> vertex
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 output
OPTIONS:
-d <dir>
Directory with the shaders
-e <env>
This option let you choose the target environnement for Shaderc,
Accepted value are:
vulkan, opengl, opengl_compat [default: vulkan]
-O <optimization>
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>
Output directory
-s <spirv>
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
With cargo
:
cargo install shdrr