shdrr

Crates.ioshdrr
lib.rsshdrr
version0.1.3
sourcesrc
created_at2019-07-15 14:01:21.685647
updated_at2019-08-14 07:30:05.377045
descriptionA live shader compiler using shaderc.
homepage
repositoryhttps://github.com/maeln/shdrr
max_upload_size
id149188
size52,308
Maël Naccache Tüfekçi (maeln)

documentation

README

SHDRR: Live shader compiler

Crates.io Build Status

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

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 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

Installation

With cargo:

cargo install shdrr
Commit count: 11

cargo fmt