From a435c933178bf150dca1624983d674a8d4b9de2a Mon Sep 17 00:00:00 2001 From: tata <8picoz@tata.pw> Date: Sun, 22 May 2022 01:13:57 +0900 Subject: [PATCH] Add note comment about environment variable --- docs/src/writing-shader-crates.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/src/writing-shader-crates.md b/docs/src/writing-shader-crates.md index 36e37770c7..945a51e26d 100644 --- a/docs/src/writing-shader-crates.md +++ b/docs/src/writing-shader-crates.md @@ -67,6 +67,8 @@ rustdoc for documentation. const SHADER: &[u8] = include_bytes!(env!(".spv")); ``` +> **Note** If your shader name contains hyphens, the name of environment variable will be the name with hyphens changed to underscores. + Keep in mind that by default, build-dependencies are built in debug mode. This means that the rust-gpu compiler (`rustc_codegen_spirv`) will be built in debug mode, and will be *incredibly* slow. You can solve this by placing this bit of