Support the channel here: https://www.patreon.com/cw/TimidAutomaton
This video is a quick run through of how to setup a hello world program with Winit and WGPU. The result is a program that opens a window and draws some triangles to the screen using the @builtin(vertex_index) and @builtin(instance_index) of a vertex shader in WGSL.
Find the example code here: https://github.com/TimidAutomaton/WGPUExamples/tree/main
00:00 Intro
00:17 Creating a Window (Explanation)
00:56 Creating a Window (Code)
01:49 WGPU (Creating AppEnvironment structure)
03:24 Shaders (Explanation)
04:48 Shaders(Code)
07:26 Creating AppData structure (WGPU::RenderPipeline)
09:16 Creating Render() function
11:33 Combining the pieces (Finishing main.rs)
12:02 Outro
Resources:
WebGPU docs: https://www.w3.org/TR/webgpu/
WebGPU Fundamentals: https://webgpufundamentals.org/
WGSL docs: https://www.w3.org/TR/WGSL/
Winit docs: https://docs.rs/winit/latest/winit/
Microsoft definition of view: https://learn.microsoft.com/en-us/windows/uwp/graphics-concepts/views
WGSL attributes: https://www.w3.org/TR/WGSL/#attribute-names
WGSL built-ins: https://www.w3.org/TR/WGSL/#builtin-value-names
WGSL inter-stage IO: https://www.w3.org/TR/WGSL/#stage-inputs-outputs
#Winit #Rust #WGPU #WebGPU #HelloWorld #GraphicsProgramming #WGSL #Shaders