WGPU part 4: Buffers and Bind Groups
Support the channel here: https://www.patreon.com/cw/TimidAutomaton Find the example code here: https://github.com/TimidAutomaton/WGPUExamples/tree/main This video is a quick explanation of buffers and bindgroups in WGPU. We explain vertex, uniform, and storage buffers and how they are passed to the GPU. This is the majority of the information you need to know to communicate data between your CPU programs and GPU programs. We’ll talk about textures next time, but this gives you the basic idea of how they will be implemented as well. Timestamps: 00:00 Intro 00:05 Buffers (Explanation) 00:42 Vertex Buffer (Explanation) 01:41 Vertex Buffer (Code) 02:23 Buffer Creation (Code) 04:41 Buffer Layout Creation (Code) 06:03 Adding Layout to Pipeline and Render Pass (Code) 06:22 Shader Code 07:46 Adding Instances (Code) 09:03 Index Buffers 10:07 Bind Groups (Explanation) 10:35 Uniform Buffer (Explanation) 10:57 Uniform Buffer and Bind Group (Code) 11:58 Adding Bind Group to Pipeline (Code) 11:58 Adding Bind Group to Render Pass (Code) 12:14 Shader Code 12:38 Updating a Uniform (Code) 13:08 Storage Buffers (Explanation) 13:32 Storage Buffer (Code) 14:30 Shader Code 14:54 Reading from a Buffer (Code) 16:06 Very Brief sRGB Explanation 16:43 Outro Getting data into buffers https://docs.rs/wgpu/latest/wgpu/struct.Buffer.html https://www.w3.org/TR/webgpu/#buffers https://developer.mozilla.org/en-US/docs/Web/API/GPUQueue/writeBuffer WGPU Setting Limits https://docs.rs/wgpu/latest/wgpu/struct.Limits.html Image code from https://github.com/image-rs/image A bunch of color stuff I brushed over SRGB https://en.wikipedia.org/wiki/SRGB https://www.image-engineering.de/library/technotes/714-color-spaces-rec-709-vs-srgb Gamme Correction https://en.wikipedia.org/wiki/Gamma_correction Chromitacity https://jlongster.com/why-chromaticity-shape Transfer Functions https://en.wikipedia.org/wiki/Transfer_functions_in_imaging #Winit #Rust #WGPU #WebGPU #GraphicsProgramming #WGSL #Shaders #sRGB #Buffers #BindGroups #UniformBuffers #StorageBuffers #VertexBuffers #BufferMapping
Download
0 formatsNo download links available.