Skip to content

Latest commit

 

History

History
147 lines (92 loc) · 6.59 KB

getting-started.md

File metadata and controls

147 lines (92 loc) · 6.59 KB

Examples

  1. Tiny

A basic example showing how to render a triangle.

image

  1. Tiny_Mesh

An intermediate example showing how to render multiple textured meshes and ImGui integration.

image

  1. Tiny_MeshLarge

A complex example demonstrating most of IGL features and rendering the Lumberyard Bistro mesh. Learn how to draw the rest of the owl.

image

RenderSessions

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.

Start here

  1. EmptySession

An empty session. You can use it as a template for a new project

image

  1. BasicFramebufferSession

A basic session showing how to create a framebuffer

image

  1. HelloWorldSession

A basic session showing how to render a triangle

image

  1. ColorSession

A basic session showing how to render a textured quad

image

  1. ImguiSession

A basic session showing how to use ImGUI with IGL

image

  1. MRTSession

A basic session showing how to use multiple render targets feature

image

  1. Textured3DCubeSession

A basic session showing how to use 3D textures

image

  1. TQMultiRenderPassSession

A basic session showing how to use multiple render passes

image

  1. TQSession

A basic session rendering a textured quad with generated mipmaps

image

Resources and bindings

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

Pipeline and raster state

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

Draw calls and compute

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

Meshes and larger scenes

Session What it shows
TinyMeshSession The Tiny_Mesh sample as a render session, with ImGui
TinyMeshBindGroupSession The same scene driven through bind groups

Profiling and stress

Session What it shows
GPUTimerSession Timing GPU work with ITimer and CommandBufferDesc::timer
GPUStressSession A configurable load generator, including multiview

Slang

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

OpenXR

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