From 2dcbfbe01e0ea3b5df9ff199fa754ecd575c63d9 Mon Sep 17 00:00:00 2001 From: Hiroaki Yutani Date: Mon, 10 Jan 2022 09:57:18 +0900 Subject: [PATCH] Mention include_wgsl! --- docs/beginner/tutorial3-pipeline/README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/beginner/tutorial3-pipeline/README.md b/docs/beginner/tutorial3-pipeline/README.md index 65b088fc..e6f5dc9b 100644 --- a/docs/beginner/tutorial3-pipeline/README.md +++ b/docs/beginner/tutorial3-pipeline/README.md @@ -146,6 +146,17 @@ let shader = device.create_shader_module(&wgpu::ShaderModuleDescriptor { }); ``` +
+ +You can also use `include_wgsl!` macro as a small shortcut to create the `ShaderModuleDescriptor`. + +```rust +let shader = device.create_shader_module(&include_wgsl!("shader.wgsl")); +``` + +
+ + One more thing, we need to create a `PipelineLayout`. We'll get more into this after we cover `Buffer`s. ```rust