allows easily creating arbitrary ray tracing pipelines out of sets of
bindings and shaders
what's missing:
- optimal handling of duplicate shaders
- reading bindings from shaders (parse SPIR-V) instead of specifying in
code
- automatic resource creation according to binding definitions
- automatic barriers according to bindings interface
it stays roughly the same, vgpr 256, etc.
perf is a tiny bit better (12ms vs 14ms for all poly lights in c1a0
lobby /w shadows), but it may be sampling artifact
Allocate device memory in big 128Mb chunks. Sub-allocate buffers, images
and other resources within those chunks.
This uses a dumb grow-only bump allocator for now. Will not work for
more than a couple maps.
known issues:
- visible cluster boundaries which affect sampling outcomes
(essentially clusters act like very coarse shadows, and that's visible)
moving brush models are not supported yet, affects perf measurements
also change:
- pass plane equation instead of just normal
- pass area separately
- pack vertices offset+count into single integer
582us, 224(224)v, 97(128)v, 4096lds, 2/16o (-53v => +1)
known issues:
- noise is fixed
- overall light is too dark
- some lights are facing the wrong direction
test_brush2, green room, direct light:
336us, 192(192)v, 97(128)s, 4096lds, 2/16o (-45v => +1o)
also start refactoring light collection
broken:
- reloading lights after patching
- wagonchik lights (attached to non-static models)
missing:
- clustering the new poly lights
- proper sampling, only rough estimate for now
- shadows
probably a lot more
Light polygons that are:
- self-sufficient (no kusochki indirection needed).
- pre-transformed
- contain enough metadata (area, center, normal) for quick sampling
- are polygons with up to 7 vertices and not triangles (easier sampling)
Also move rad file reading to before brush model loading, as it now
requires lighting data.
- fix normal2 packing
- work around desynced light cluster sizes
known issues:
- static seed for random
- no emissive
- no shadows
perf (direct): 6.4ms, 183(184)v, 59(128)s, lds=0, 2/16o (?!)