A basic example showing how to render a triangle.
An intermediate example showing how to render multiple textured meshes and ImGui integration.
A complex example demonstrating most of IGL features and rendering the Lumberyard Bistro mesh. Learn how to draw the rest of the owl.
RenderSessions use iglshell functionality that provides platform abstraction and basic application functionality.
They are built when IGL_WITH_SAMPLES is enabled, which is the default.
An empty session. You can use it as a template for a new project
A basic session showing how to create a framebuffer
A basic session showing how to render a triangle
A basic session showing how to render a textured quad
A basic session showing how to use ImGUI with IGL
A basic session showing how to use multiple render targets feature
A basic session showing how to use 3D textures
A basic session showing how to use multiple render passes
A basic session rendering a textured quad with generated mipmaps
| Session | What it shows |
|---|---|
| BindGroupSession | Binding textures and buffers through bind groups |
| BindlessBufferSession | Addressing buffers in the shader via DeviceFeatures::BufferDeviceAddress |
| BufferMappingSession | Updating a buffer with map() / unmap() instead of upload() |
| CopyOperationsSession | Reading a color attachment back to the CPU with copyBytesColorAttachment() |
| TextureViewSession | Creating texture views over mip levels and array layers |
| CheckerboardMipmapSession | Generating mipmaps and watching the level selection change |
| YUVColorSession | Sampling NV12 and 420p YUV textures, as single-plane and per-plane samplers |
| Session | What it shows |
|---|---|
| SpecConstantsSession | Specialization constants, one shader compiled into several pipelines |
| DepthBiasSession | setDepthBias() for coplanar geometry |
| ScissorTestSession | Restricting rendering with the scissor rectangle |
| StencilOutlineSession | Drawing an outline with the stencil buffer |
| WireframeSession | PolygonFillMode::Line over a filled pass |
| SubpassDeferredSession | Subpasses with input attachments, for tile-based deferred shading |
| Session | What it shows |
|---|---|
| DrawInstancedSession | Instanced drawing |
| MultiDrawIndexedIndirectSession | multiDrawIndexedIndirect() with draw parameters in a storage buffer |
| MeshShaderTriangleSession | A task/mesh shader pipeline and drawMeshTasks() |
| FireworksSession | A GPU particle system, billboarded in the vertex shader |
| Session | What it shows |
|---|---|
| TinyMeshSession | The Tiny_Mesh sample as a render session, with ImGui |
| TinyMeshBindGroupSession | The same scene driven through bind groups |
| Session | What it shows |
|---|---|
| GPUTimerSession | Timing GPU work with ITimer and CommandBufferDesc::timer |
| GPUStressSession | A configurable load generator, including multiview |
Two sessions are written entirely in Slang and run the same shader source on every backend. See shell/renderSessions/slang/README.md for what each program does, and tools/slang/README.md for how the generated headers are produced.
| Session | What it shows |
|---|---|
| SlangSplatsSession | Fits 2048 anisotropic 2D splats to an image by gradient descent on the GPU, using Slang's reverse-mode autodiff. Runs on every backend; backends with compute train live, the rest draw splats trained ahead of time |
| SlangShowcaseSession | A grid of physically based spheres: generic and dynamically dispatched material lobes, then inverse rendering that recovers their parameters. Metal and Vulkan only |
Built when IGL_WITH_OPENXR is enabled.
| Session | What it shows |
|---|---|
| HelloOpenXRSession | A minimal OpenXR session (Android, and Windows through the OpenXR simulator) |
| HandsOpenXRSession | Hand tracking on Android |











