navigator.gpu.requestAdapter() → IDXGIAdapter
.requestDevice() → ID3D12Device + Direct queue (merged!)
device.createCommandEncoder() → Command allocator + list
encoder.beginRenderPass(...) → OMSetRenderTargets scope (explicit pass)
device.createRenderPipeline() → ID3D12PipelineState (immutable, one-shot)
pipeline.getBindGroupLayout() → root parameter reflection
device.createBindGroup(...) → descriptor heap slice → root params
queue.submit([cmdBuffer]) → ExecuteCommandLists + implicit present
No vertex buffer at all — positions generated from
@builtin(vertex_index). No viewport/scissor — the render pass
defaults to the attachment size. No fences — queue.submit is ordered.
float4 / float3x3 vec4f / mat3x3f
[SV_Position] @builtin(position)
semantics on params attributes declared per-field
cbuffer var<uniform> (address space!)
The canvas is the triangle from §2 plus the lesson exercise already wired:
time as a 16-byte uniform written via device.queue.writeBuffer each frame,
bind group created from pipeline.getBindGroupLayout(0), and the three
vertices rotating around origin in the VS. Read the source of this page — the WGSL
for the rotation is commented.
Answer these in chat before lesson 0002:
fragment.targets[0].format equal the configured canvas format?ResourceBarrier(RENDER_TARGET → PIXEL_SHADER_RESOURCE)?getBindGroupLayout(0) rather than being invented?