#shader #path #automatic #create #multiple #stages #directory

ash_shader_creator

A library for easy to way automatically create multiple shader stages from the directory path

2 stable releases

1.4.1 Aug 15, 2021
1.3.3 Aug 15, 2021
1.2.2 Aug 14, 2021
1.1.2 Aug 14, 2021
1.0.2 Aug 14, 2021

#8 in #stages

36 downloads per month

Apache-2.0

13KB
156 lines

ash_shader_creator

A library for easy to way automatically create multiple shader stages from the directory path.

use ash::{Device, PipelineShaderStageCreateFlags, PipelineShaderStageCreateInfo};
use std::path::Path;

let shader_stage_flags = PipelineShaderStageCreateFlags::RESERVED_2_NV | PipelineShaderStageCreateFlags::ALLOW_VARYING_SUBGROUP_SIZE_EXT;
let shader_stages_create_info: Vec<PipelineShaderStageCreateInfo> =
    ShaderStage::new(&device, &Path::new("example_path/compiled_shaders"))
        .with_shader_stage_flags(shader_stage_flags)
        .build();

What the library can do?

  • Supports GLSL
  • Supports HLSL
  • Creating shaders from multiple directories

Important

For today, library can creates only shader stages from the names of compiled shaders that have:

  • For the GLSL: <file_name>.vert.spv for the vertex shader and <file_name>.frag.spv for the fragment shader.
  • For the HLSL: <file_name>.vs for the vertex shader and <file_name>.fs for the fragment shader.

Contacts

Discord: Жоржик#1991

Dependencies

~5.5MB
~140K SLoC