Module shader

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

ProgramSourceDigest
ShaderSourceParser

Enums§

ShaderKind
ShaderVersion

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.