[][src]Macro nobs_vkpipes_macro::shader

shader!() { /* proc-macro */ }

Generates code for a shader stage

The shader stage can be configured by a comma separated list of fields, described in the table below:

specifier type mandatory description example
ty str yes Type of the shader, must be one of ["comp", "vert", "tesc", "tese", "geom", "frag"]. The pipeline type (compute or graphics) is inferred from the specified stages. ty = "comp"
glsl str yes* Specifies either a shader file, or actual glsl shader code. If glsl is specified spv must not be specified. glsl = "src/shader.comp"
spv str yes* Specifies a compiled shader file. If spv is specified glsl must not be specified. glsl = "src/shader.spv"
include [str] no List of strings specifying include directories if the shader is specified as glsl file. include = ["src/global", "src/util"]
vk_alias str no Alias of the import of the nobs-vk crate. Set to "vk" by default. vk_alias = "othervk"
vkpipes_alias str no Alias of the import of the nobs-vkpipes crate. Set to "vk::pipes" by default. vkpipes_alias = "otherpipes"
dump str no Filename to which the output of the code generation will be written. dump = "dump/my_pipeline.rs"

See [here] for whole pipeline configuration.