Function hassle_rs::utils::compile_hlsl
source · [−]pub fn compile_hlsl(
source_name: &str,
shader_text: &str,
entry_point: &str,
target_profile: &str,
args: &[&str],
defines: &[(&str, Option<&str>)]
) -> Result<Vec<u8>>
Expand description
Helper function to directly compile a HLSL shader to an intermediate language,
this function expects dxcompiler.dll
to be available in the current
executable environment.
Specify -spirv as one of the args
to compile to SPIR-V
dxc_path
can point to a library directly or the directory containing the library,
in which case the appended filename depends on the platform.