You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit d9bf2d9
Browse filesBrowse the repository at this point in the historyBrowse files
Paint: saved meshes follow the paint, new values without the CSG (#65)
* Saved meshes are kept only while their paint is the same
The hash that decides whether a model keeps the meshes saved with its scene
(and so what a build takes) has each generator's paint and what the shader of
each of its materials takes of paint. Paint changed outside the editor, or a
shader that takes paint differently, builds the model when the scene opens
rather than keeping meshes with the old paint.
* Paint: new values are drawn without building a brush
When an entity's paint changes only in its values on the same grids, the
values are written in place, the hashes of the surfaces they are on are put
right in the brushes' cached buffers (the paint's part of a surface's hash
is xor-ed in last for that), and the next update copies the meshes again
without building a brush. New grids, a tree that kept its saved meshes, or
brushes not built yet still have the brushes built.
* The saved-mesh hash doesn't hold on to a model's paint
The lists the paint part of the hash is gathered in are cleared after it, so
a destroyed model's meshes aren't kept loaded through them.
* Paint: what a material takes is compared per material
Only a material resolved before whose paint attributes changed has every
brush built again; a material resolved for the first time (every one, when
the editor starts) is in the brushes being built with it, so models keep
their saved meshes when a scene opens. The paint manager's work set is a set,
emptied after each update so it holds no generator between updates.
0 commit comments