Skip to content

perf: virtual texturing / sampler feedback streaming #140

Description

@shadow-kernel

Context

Verified gap: every texture keeps its full mip stack resident — "single full-res mip stack per texture, all resident. No sparse virt-tex feedback or resident-set streaming", and no Sampler Feedback Maps (perf gap analysis; Engine/Graphics/Resources/ResourceRegistry.h, TextureImporter). Big horror environments with 4K PBR sets (the ambientCG store integration auto-builds full map sets) will blow past VRAM long before geometry does. v3.4's async asset streaming handles whole-asset residency; this issue makes texel residency demand-driven.

Goal

Implement virtual texturing: tile-based (reserved/sparse resource) texture storage where only the tiles actually sampled — discovered via DX12 Sampler Feedback or a shader-written feedback buffer — are resident, giving effectively unlimited texture worlds on fixed VRAM.

Acceptance Criteria

  • Tiled/reserved resource backing for opted-in textures with a page table + indirection texture sampled in standard.hlsl
  • Feedback path (Sampler Feedback where supported, shader-feedback fallback) driving per-tile mip requests
  • Background tile loader on the job system + async streaming infrastructure, priority by mip bias/distance
  • Graceful degradation: missing tiles sample the lowest resident mip (visible pop, never corruption)
  • VRAM residency stats (resident tiles / requested tiles / eviction rate) in engine telemetry
  • Benchmark scene with texture footprint > VRAM runs within a fixed residency budget at stable frame times

Technical Notes

P3 and last in sequence — explicitly after v3.4 async asset streaming. Check D3D12_FEATURE_SAMPLER_FEEDBACK tier; feedback-buffer fallback keeps GTX-class GPUs working. Bindless heap makes the indirection/page-table binding trivial.

Dependencies

  • core: async asset streaming — textures & meshes on demand
  • perf: bindless resources (descriptor indexing)
  • perf: render graph / frame graph architecture

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3-lowNiedrige Priorität / Nice-to-havearea:renderingRenderer, Lichter, Schatten, Post-FX, Shadersize:XLMehrere Wochen / Epic aufteilentype:perfPerformance-Arbeit (FPS, Speicher, Ladezeiten)

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions