Repository navigation
Volumes and density grids come in place - #201
Merged
Merged
Conversation
…g them again A new texture, a material given a map, a new material with maps and a texture's new pixels rebuilt the scene (4.5 s on Bistro: the pages packed whole). The pages keep where each texture is and what they have free (texpack::Atlas); a texture is placed among them and written there, the pages growing by a layer or a side with a copy on the GPU; new pixels of the same size go over the old ones. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…s textures, its mesh Adding a model whose file the scene did not hold rebuilt it (5.2 s on Bistro). Its materials are made as the build makes them and its textures placed in the pages before the edit places it; its mesh is made in the room by the code a scene's mesh is made by (make_mesh, moved out of edit_geometry). A mesh given back is no model's any more. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
A feature a scene first uses (fog, glass, a texture) changed the kernel's variant, and the next frame waited for the driver's compile (0.8 to 2.4 s here, tens of seconds on a phone). The view now runs the kernel it has until the scene's is made on another thread (Gpu::warm_kernel; modules and pipelines made without a lock held). In lockstep, and in a browser, the frame makes its kernel itself as before. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…ce comes in place Each was refused for a kernel feature the scene's structure lacked (F_MASKED, F_IFUNC, F_IGLASS) and rebuilt the scene. The three switch code on over data every scene has: the edit asks for the feature, the commit adds it to the scene's, and the kernel's variant with it is made as any other. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
A new or changed material function rebuilt the scene (4.2 s on Bistro, and 7.9 s once a texture had come in place: the pages packed whole). The scene keeps its functions by number, one that comes takes the next; the kernel with them is another module, made while the frames go on with the one the view has, where a material of a function it has not is drawn as one without. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
A light created, removed or set again as one of another class rebuilt the scene, and so did a group (1.5 s on Bistro each). A light that is the light table's alone (not a rect light's card, not the atmosphere's sun) has its entry added, dropped or sorted again in place: the table is listed in a build's order, grown where it is full, and the kernel's counts follow. Lights past what the kernel sums exactly still rebuild (the light tiles). Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…ild; the textures' test holds a shared slot and the grown pages' contents Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
… the light table's growth; tests for a model that emits, lights among those resampled, a shelf too low Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…ice is one thread's) Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…is made again with the translucency pass's functions as they are now The pass's dispatch has its particles' materials' functions alone, made when the kernel is. A material that changed function in place kept the old one (drawn as without a function). The kernel's functions are remade after the commit's materials, where a function came or changed or the particles' functions are others. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
A volume created, set again, removed, or moved where it stood still rebuilt the scene, and so did a volume function. The media table is made again from the world as the build makes it (the volumes shown, the hidden ones while there is room), the kernel's count and media features follow, and volume functions are numbered as they come: the kernel with them is another module, made while the frames go on. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
# Conflicts: # renderer/src/gpu.rs # renderer/src/live/edits.rs # renderer/src/live/inplace_tests.rs # renderer/src/live/load.rs # renderer/src/world.rs
A new grid, another size, another program, a program's code or its parameters are the media table's change: the grids are made again as a build stacks them (one function for both), and what the programs had simulated goes with the grids that are still the same. Parameters alone make nothing again. A simulated grid's program follows its volume's box when a still volume is moved. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…ia table; docs Two mutations no test failed: the media table's growth not bound again (the tests had two volumes, the table room for two), and a grid counted the same although its volume was another (the tests never had that alone). A grid that only passes to another volume is not made again: its node is taken with its placement. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…mpared Where a grid lies follows from the grids before it (a mutation of that comparison changed nothing). Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
yujiaxu-ops
marked this pull request as ready for review
November 23, 2026 13:21
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Reviewed by Cursor Bugbot for commit 7a21159. Configure here.
A rebuild said the lighting changed (the temporal pass and the cache hold short histories and look for the change for 45 frames); the media table made in place did not, and neither did a volume shown or hidden in place. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Volumes and density grids come in place
A volume that came, went or was set again while a game ran, a still volume's first move, a volume function, a new density grid and a grid program each had the scene built again from the world. On Bistro (2.8 M triangles, 960 x 540, an M5 Pro), the frame the edit landed in:
Frames are 16.6 ms; each cell is the longest frame within 1.5 s of the edit, over two runs (main: two to four). On main a rebuild that needed a kernel variant the driver had not compiled took 5.1 to 5.4 s instead; here the variant is made beside the frames and the volume is drawn when it is there.
LiveCore::set_media,scene::MediumGpu::of): the volumes shown, and the hidden ones while the kernel has room. A volume function that comes takes the next number (Kernel::with_volume_functions); the kernel's count of media and its media features follow, and a scene's first volume is another kernel variant, made beside the frames.Gpu::put_grids). The build and the view stack them by one function (scene::grid_of). A new grid, another size, another program or a program's code has the atlas and the programs' pass made again; what the programs had simulated is copied on the GPU to the grids that are the same still. New parameters make nothing again.docs/RUNTIME.md "What comes in place" has the rules and what still rebuilds: particle systems and their functions and programs; geometry functions; a posed model the scene has not got; any new model under software traversal; a rect light's card; lights past what the kernel sums exactly; the scene's first instance, procedural object, instance colours or vertex colours.
Costs that stay
Tests
volumes_come_and_go_in_place(12 steps),density_grids_come_and_change_in_place(17 steps, with the cells a program had simulated read back).density_grids_are_checked_and_updated_in_place.Checks
🤖 Generated with Claude Code