<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Wgpu on TutorialEdge.net</title><link>https://tutorialedge.net/series/wgpu/</link><description>Recent content in Wgpu on TutorialEdge.net</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Fri, 29 May 2026 10:06:00 +0000</lastBuildDate><atom:link href="https://tutorialedge.net/series/wgpu/index.xml" rel="self" type="application/rss+xml"/><item><title>Part 1 - Project Setup and Your First Window</title><link>https://tutorialedge.net/projects/graphics-with-wgpu-in-rust/part-1-project-setup-and-first-window/</link><pubDate>Fri, 29 May 2026 10:01:00 +0000</pubDate><guid>https://tutorialedge.net/projects/graphics-with-wgpu-in-rust/part-1-project-setup-and-first-window/</guid><description>&lt;p&gt;Welcome to the first part of this series on graphics programming with wgpu in Rust! By the end of this article, you&amp;rsquo;ll have a Rust program that opens a window and responds to input events. It doesn&amp;rsquo;t draw anything yet, but it&amp;rsquo;s the skeleton that everything else will hang from.&lt;/p&gt;
&lt;h2 id="what-is-wgpu"&gt;
 &lt;a href="#what-is-wgpu" class="heading-anchor" aria-hidden="true"&gt;##&lt;/a&gt;What is wgpu?&lt;/h2&gt;
&lt;p&gt;wgpu is a Rust graphics library that talks to your GPU using whichever native API your platform provides — Vulkan on Linux, Metal on macOS, DirectX 12 on Windows, and WebGPU in the browser. You write one codebase and it runs everywhere.&lt;/p&gt;</description></item><item><title>Part 2 - The Render Pipeline</title><link>https://tutorialedge.net/projects/graphics-with-wgpu-in-rust/part-2-the-render-pipeline/</link><pubDate>Fri, 29 May 2026 10:02:00 +0000</pubDate><guid>https://tutorialedge.net/projects/graphics-with-wgpu-in-rust/part-2-the-render-pipeline/</guid><description>&lt;p&gt;In &lt;a href="../../projects/graphics-with-wgpu-in-rust/part-1-project-setup-and-first-window/"
 title="Part 1" 
 &gt;
 Part 1&lt;/a&gt; we opened a window. In this part, we connect that window to the GPU and draw our first frame — a solid colour fill. It&amp;rsquo;s a modest result, but it means the full rendering pipeline is working end-to-end.&lt;/p&gt;
&lt;h2 id="how-the-gpu-pipeline-works"&gt;
 &lt;a href="#how-the-gpu-pipeline-works" class="heading-anchor" aria-hidden="true"&gt;##&lt;/a&gt;How the GPU Pipeline Works&lt;/h2&gt;
&lt;p&gt;Before writing code, here&amp;rsquo;s the mental model you need.&lt;/p&gt;
&lt;p&gt;&lt;img src="../../images/wgpu-gpu-pipeline.svg" alt="wgpu GPU pipeline diagram" /&gt;&lt;/p&gt;
&lt;h3 id="cpu-side-recording-commands"&gt;
 &lt;a href="#cpu-side-recording-commands" class="heading-anchor" aria-hidden="true"&gt;###&lt;/a&gt;CPU side: recording commands&lt;/h3&gt;
&lt;p&gt;The CPU never tells the GPU to draw a single pixel directly. Instead it &lt;em&gt;records&lt;/em&gt; a list of operations into a &lt;strong&gt;command encoder&lt;/strong&gt; — think of it as building a script to hand off. That script captures one or more &lt;strong&gt;render passes&lt;/strong&gt;, each of which describes what to draw and where to write the results.&lt;/p&gt;</description></item><item><title>Part 3 - Drawing Your First Triangle</title><link>https://tutorialedge.net/projects/graphics-with-wgpu-in-rust/part-3-drawing-your-first-triangle/</link><pubDate>Fri, 29 May 2026 10:03:00 +0000</pubDate><guid>https://tutorialedge.net/projects/graphics-with-wgpu-in-rust/part-3-drawing-your-first-triangle/</guid><description>&lt;p&gt;The triangle is the &amp;ldquo;hello world&amp;rdquo; of graphics programming. In this part we define vertex data, upload it to the GPU, write our first shaders in WGSL, and draw a colourful triangle to the screen.&lt;/p&gt;
&lt;p&gt;Add &lt;code&gt;bytemuck&lt;/code&gt; to &lt;code&gt;Cargo.toml&lt;/code&gt; before you start:&lt;/p&gt;
&lt;div class="filename"&gt;Cargo.toml&lt;/div&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#d8dee9;background-color:#2e3440;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-toml" data-lang="toml"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#eceff4"&gt;[&lt;/span&gt;dependencies&lt;span style="color:#eceff4"&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;wgpu &lt;span style="color:#eceff4"&gt;=&lt;/span&gt; &lt;span style="color:#a3be8c"&gt;&amp;#34;0.20&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;winit &lt;span style="color:#eceff4"&gt;=&lt;/span&gt; &lt;span style="color:#a3be8c"&gt;&amp;#34;0.29&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;pollster &lt;span style="color:#eceff4"&gt;=&lt;/span&gt; &lt;span style="color:#a3be8c"&gt;&amp;#34;0.3&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;env_logger &lt;span style="color:#eceff4"&gt;=&lt;/span&gt; &lt;span style="color:#a3be8c"&gt;&amp;#34;0.11&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;log &lt;span style="color:#eceff4"&gt;=&lt;/span&gt; &lt;span style="color:#a3be8c"&gt;&amp;#34;0.4&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;bytemuck &lt;span style="color:#eceff4"&gt;=&lt;/span&gt; &lt;span style="color:#eceff4"&gt;{&lt;/span&gt; version &lt;span style="color:#eceff4"&gt;=&lt;/span&gt; &lt;span style="color:#a3be8c"&gt;&amp;#34;1.14&amp;#34;&lt;/span&gt;&lt;span style="color:#eceff4"&gt;,&lt;/span&gt; features &lt;span style="color:#eceff4"&gt;=&lt;/span&gt; &lt;span style="color:#eceff4"&gt;[&lt;/span&gt;&lt;span style="color:#a3be8c"&gt;&amp;#34;derive&amp;#34;&lt;/span&gt;&lt;span style="color:#eceff4"&gt;]&lt;/span&gt; &lt;span style="color:#eceff4"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="what-is-a-vertex-buffer"&gt;
 &lt;a href="#what-is-a-vertex-buffer" class="heading-anchor" aria-hidden="true"&gt;##&lt;/a&gt;What is a Vertex Buffer?&lt;/h2&gt;
&lt;p&gt;The GPU doesn&amp;rsquo;t know about Rust structs. To draw geometry, you copy raw bytes into a &lt;strong&gt;vertex buffer&lt;/strong&gt; — a block of GPU memory that the vertex shader reads one vertex at a time. We define a &lt;code&gt;Vertex&lt;/code&gt; struct, fill a slice of them, and upload it.&lt;/p&gt;</description></item><item><title>Part 4 - Colors and Uniforms</title><link>https://tutorialedge.net/projects/graphics-with-wgpu-in-rust/part-4-colors-and-uniforms/</link><pubDate>Fri, 29 May 2026 10:04:00 +0000</pubDate><guid>https://tutorialedge.net/projects/graphics-with-wgpu-in-rust/part-4-colors-and-uniforms/</guid><description>&lt;p&gt;So far our triangle is static. In this part we add a CPU-to-GPU data channel called a &lt;strong&gt;uniform buffer&lt;/strong&gt;, and use it to animate the triangle&amp;rsquo;s colour tint every frame.&lt;/p&gt;
&lt;h2 id="what-is-a-uniform-buffer"&gt;
 &lt;a href="#what-is-a-uniform-buffer" class="heading-anchor" aria-hidden="true"&gt;##&lt;/a&gt;What is a Uniform Buffer?&lt;/h2&gt;
&lt;p&gt;A &lt;strong&gt;uniform&lt;/strong&gt; is a value that stays constant across all vertices and fragments in a single draw call, but can be updated between frames. It&amp;rsquo;s how you pass per-frame data — time, camera position, colour — from your Rust code into the shader.&lt;/p&gt;</description></item><item><title>Part 5 - Textures and Image Loading</title><link>https://tutorialedge.net/projects/graphics-with-wgpu-in-rust/part-5-textures-and-image-loading/</link><pubDate>Fri, 29 May 2026 10:05:00 +0000</pubDate><guid>https://tutorialedge.net/projects/graphics-with-wgpu-in-rust/part-5-textures-and-image-loading/</guid><description>&lt;p&gt;A triangle is a great proof-of-concept, but most real graphics involve images. In this part we load a PNG, upload it to the GPU as a texture, and sample it onto a textured quad.&lt;/p&gt;
&lt;p&gt;Add the &lt;code&gt;image&lt;/code&gt; crate to &lt;code&gt;Cargo.toml&lt;/code&gt;:&lt;/p&gt;
&lt;div class="filename"&gt;Cargo.toml&lt;/div&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#d8dee9;background-color:#2e3440;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-toml" data-lang="toml"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#eceff4"&gt;[&lt;/span&gt;dependencies&lt;span style="color:#eceff4"&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;wgpu &lt;span style="color:#eceff4"&gt;=&lt;/span&gt; &lt;span style="color:#a3be8c"&gt;&amp;#34;0.20&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;winit &lt;span style="color:#eceff4"&gt;=&lt;/span&gt; &lt;span style="color:#a3be8c"&gt;&amp;#34;0.29&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;pollster &lt;span style="color:#eceff4"&gt;=&lt;/span&gt; &lt;span style="color:#a3be8c"&gt;&amp;#34;0.3&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;env_logger &lt;span style="color:#eceff4"&gt;=&lt;/span&gt; &lt;span style="color:#a3be8c"&gt;&amp;#34;0.11&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;log &lt;span style="color:#eceff4"&gt;=&lt;/span&gt; &lt;span style="color:#a3be8c"&gt;&amp;#34;0.4&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;bytemuck &lt;span style="color:#eceff4"&gt;=&lt;/span&gt; &lt;span style="color:#eceff4"&gt;{&lt;/span&gt; version &lt;span style="color:#eceff4"&gt;=&lt;/span&gt; &lt;span style="color:#a3be8c"&gt;&amp;#34;1.14&amp;#34;&lt;/span&gt;&lt;span style="color:#eceff4"&gt;,&lt;/span&gt; features &lt;span style="color:#eceff4"&gt;=&lt;/span&gt; &lt;span style="color:#eceff4"&gt;[&lt;/span&gt;&lt;span style="color:#a3be8c"&gt;&amp;#34;derive&amp;#34;&lt;/span&gt;&lt;span style="color:#eceff4"&gt;]&lt;/span&gt; &lt;span style="color:#eceff4"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;image &lt;span style="color:#eceff4"&gt;=&lt;/span&gt; &lt;span style="color:#a3be8c"&gt;&amp;#34;0.25&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Place any PNG image at &lt;code&gt;assets/happy-tree.png&lt;/code&gt; in your project root. Any image will work — we&amp;rsquo;ll use it as the texture.&lt;/p&gt;</description></item><item><title>Part 6 - 2D Transformations</title><link>https://tutorialedge.net/projects/graphics-with-wgpu-in-rust/part-6-2d-transformations/</link><pubDate>Fri, 29 May 2026 10:06:00 +0000</pubDate><guid>https://tutorialedge.net/projects/graphics-with-wgpu-in-rust/part-6-2d-transformations/</guid><description>&lt;p&gt;Static images are a start, but real graphics need to move. In this part we apply a &lt;strong&gt;transformation matrix&lt;/strong&gt; to the vertex shader so we can rotate and scale the textured quad every frame.&lt;/p&gt;
&lt;p&gt;Add &lt;code&gt;glam&lt;/code&gt; to &lt;code&gt;Cargo.toml&lt;/code&gt;:&lt;/p&gt;
&lt;div class="filename"&gt;Cargo.toml&lt;/div&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#d8dee9;background-color:#2e3440;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-toml" data-lang="toml"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#eceff4"&gt;[&lt;/span&gt;dependencies&lt;span style="color:#eceff4"&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;wgpu &lt;span style="color:#eceff4"&gt;=&lt;/span&gt; &lt;span style="color:#a3be8c"&gt;&amp;#34;0.20&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;winit &lt;span style="color:#eceff4"&gt;=&lt;/span&gt; &lt;span style="color:#a3be8c"&gt;&amp;#34;0.29&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;pollster &lt;span style="color:#eceff4"&gt;=&lt;/span&gt; &lt;span style="color:#a3be8c"&gt;&amp;#34;0.3&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;env_logger &lt;span style="color:#eceff4"&gt;=&lt;/span&gt; &lt;span style="color:#a3be8c"&gt;&amp;#34;0.11&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;log &lt;span style="color:#eceff4"&gt;=&lt;/span&gt; &lt;span style="color:#a3be8c"&gt;&amp;#34;0.4&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;bytemuck &lt;span style="color:#eceff4"&gt;=&lt;/span&gt; &lt;span style="color:#eceff4"&gt;{&lt;/span&gt; version &lt;span style="color:#eceff4"&gt;=&lt;/span&gt; &lt;span style="color:#a3be8c"&gt;&amp;#34;1.14&amp;#34;&lt;/span&gt;&lt;span style="color:#eceff4"&gt;,&lt;/span&gt; features &lt;span style="color:#eceff4"&gt;=&lt;/span&gt; &lt;span style="color:#eceff4"&gt;[&lt;/span&gt;&lt;span style="color:#a3be8c"&gt;&amp;#34;derive&amp;#34;&lt;/span&gt;&lt;span style="color:#eceff4"&gt;]&lt;/span&gt; &lt;span style="color:#eceff4"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;image &lt;span style="color:#eceff4"&gt;=&lt;/span&gt; &lt;span style="color:#a3be8c"&gt;&amp;#34;0.25&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;glam &lt;span style="color:#eceff4"&gt;=&lt;/span&gt; &lt;span style="color:#eceff4"&gt;{&lt;/span&gt; version &lt;span style="color:#eceff4"&gt;=&lt;/span&gt; &lt;span style="color:#a3be8c"&gt;&amp;#34;0.27&amp;#34;&lt;/span&gt;&lt;span style="color:#eceff4"&gt;,&lt;/span&gt; features &lt;span style="color:#eceff4"&gt;=&lt;/span&gt; &lt;span style="color:#eceff4"&gt;[&lt;/span&gt;&lt;span style="color:#a3be8c"&gt;&amp;#34;bytemuck&amp;#34;&lt;/span&gt;&lt;span style="color:#eceff4"&gt;]&lt;/span&gt; &lt;span style="color:#eceff4"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="what-is-a-transformation-matrix"&gt;
 &lt;a href="#what-is-a-transformation-matrix" class="heading-anchor" aria-hidden="true"&gt;##&lt;/a&gt;What is a Transformation Matrix?&lt;/h2&gt;
&lt;p&gt;A &lt;strong&gt;4×4 transformation matrix&lt;/strong&gt; encodes translation (position), rotation, and scale in a single structure. Multiplying a vertex position by the matrix produces the transformed position — all three operations in one GPU instruction.&lt;/p&gt;</description></item><item><title>Building Graphics with wgpu in Rust</title><link>https://tutorialedge.net/projects/graphics-with-wgpu-in-rust/</link><pubDate>Fri, 29 May 2026 10:00:00 +0000</pubDate><guid>https://tutorialedge.net/projects/graphics-with-wgpu-in-rust/</guid><description>&lt;p&gt;Learning graphics programming feels intimidating at first. Shaders, pipelines, buffers, bind groups — it&amp;rsquo;s a lot of new vocabulary before you see anything on screen. This series cuts through that by building things you can actually run and see, one concept at a time.&lt;/p&gt;
&lt;p&gt;We&amp;rsquo;re using &lt;strong&gt;wgpu&lt;/strong&gt; — Rust&amp;rsquo;s modern GPU API that compiles to Vulkan, Metal, DirectX 12, and WebGPU. The concepts you learn here transfer directly to other graphics APIs and even to browser-based WebGPU.&lt;/p&gt;</description></item></channel></rss>