Closed heyx3 closed 1 year ago
Finished the first version of this work.
I decided that there will not be a GUI for layer stuff; instead they will continue to be hand-edited in text editors, and referenced in the scene file using preprocessor-like commands (#layer 1 rock/rock.json
). In the future, as more data is included in scene files (fog, fluids) we will probably need to add a whole data format on top of the voxel DSL, as we can't do everything in preprocessor-style commands.
Layer materials are cached, so that they're not reloaded every time the scene file changes. If a material fails to load, it preserves the previous compiled version.
There is a fallback "error material" if layer renderers fail to compile the first time.
Because none of the layer stuff will be in the GUI, a checkbox for disabling automatic layer updates from disk feels like a bad idea. There's no way to manually force a layer to reload.