Expand description
The GPU path (feature wgpu): scene tiles as half-float textures,
drawn by an egui_wgpu paint callback whose shader runs the display
transform’s Stage.
Experimental: may change in any release
(docs/stability.md).
Call install once with the render state eframe (or a test
harness) opened; from then on, viewports in that context send scene
tiles here. Without it, everything takes the CPU path.
- Textures are
Rgba16Floatwhere the adapter can sample it (elseRgba32Float), one per tile, a tile never larger than the device’smax_texture_dimension_2d. - Texels are read with
textureLoad(nearest): below 100 % the source renders at the view’s scale, one texel per physical pixel; above, each image pixel is a crisp square.
Re-exports§
pub use egui_wgpu;
Structs§
Enums§
- Surface
Policy - Which surfaces a host may configure for a wanted target.
Functions§
- choose_
surface - The surface configuration path for a host that configures its own
surface (eframe 0.36 configures 8-bit sRGB and offers no choice):
the format and colour space to configure for
wanted, among what the surface’s capabilities offer, and what the viewport will draw for once configured. Prefers what carries the wanted gamut and headroom, then fewer bits. - color_
space - The display stage’s colour space for a wgpu one;
Autoas wgpu resolves it (extended linear on half floats, sRGB otherwise). - install
- Installs the GPU path on a render state; viewports in
ctxuse it from the next frame. Records what the surface expects for every window: eframe 0.36 configuresrs.target_formatwith wgpu’s default colour space (8-bit sRGB in practice). A host that configured its surface itself callsinstall_for_surface. - install_
for_ surface install, for a surface configured withspace(and a display ofheadroom, 1.0 when unknown).- reads_
fragment_ storage - Whether an adapter with these downlevel
flagsand a device with theselimitslet the tile shader read a storage buffer in its fragment stage. WebGL 2 does not (noFRAGMENT_STORAGE, no storage buffer per stage): there, buffer device tiles are refused (DeviceTileError::BuffersUnsupported) and the buffer pipeline is not built. - render_
device - The render device of the GPU path installed in
ctx: the device aDeviceTilemust be created on, and what it can read.Nonewithout a GPU path. Read when called: set byinstallat once, not at the next frame. - surface_
format - The display stage’s surface format for a wgpu one.
- surface_
target - What a surface configured with
formatandspaceexpects, as declared by wgpu’s window system integration;headroomis the display’s (wgpu’sDisplayHdrInfo), 1.0 when unknown.