Expand description
Functionality for managing source code for shaders.
This module is used during precompilation (build.rs) and regular compilation, so it has minimal dependencies.
Re-exports§
pub use crate::shader_features::*;
Structs§
Enums§
Functions§
- build_
shader_ main_ string - Walks the main .glsl file, including any imports.
- build_
shader_ prefix_ string - Walks the prefix section of the shader string, which manages the various defines for features etc.
- build_
shader_ strings - Creates heap-allocated strings for both vertex and fragment shaders.
- do_
build_ shader_ string - Walks the given shader string and applies the output to the provided callback. Assuming an override path is not used, does no heap allocation and no I/O.
- shader_
source_ from_ file - Reads a shader source file from disk into a String.