E4D read as the next version of E3D, which the format isn't meant to be tied to; EU07M goes with the world format .eu07.
The format isn't released, so nothing reads the old name.
- The extension .eu07m, the magic EU7M (the four bytes of the header), model/eu07m/ with eu07m_*.{h,cpp},
namespace eu07m, docs/eu07m-format.md, tests/unit/test_eu07m.cpp.
- The command line -eu07m convert|dump|validate|diff, TModel3d::LoadFromEU07M, and the key modelformat eu07m|legacy
of eu07.ini (Global.modelformat_eu07m).
- Nothing else changes: the sections, the records and the components are the same, so a converted file needs only its
magic and its extension changed.
Unit tests 1189/1189.
Stage 3 of the E4D model format. A model loaded from .e4d (modelformat e4d) reaches the Vulkan renderer as its compact
streams: positions (12 B), attributes (QTangent snorm16x4 + uv f32x2, 16 B), user data and indices, without the 48-byte
gfx::basic_vertex in between.
- gfx: gfx::compact_attributes, geometry_bank::create_compact() and GfxRenderer->Insert_Compact(). The default of
Insert_Compact decodes to basic_vertex, so the OpenGL 4.6 and the null renderers get the models as before. The CPU
readers of a chunk (pantograph, bounds, picking, the editor) get basic_vertex made from the streams the first time they
read it; a chunk which is changed (replace, append) turns into basic_vertex first.
- Vulkan: a bank whose chunks are all compact keeps positions, user data, attributes and indices in buffers of their own;
vertex_kind::scene_compact reads them (location 5 the quaternion as R16G16B16A16_SNORM). A program gets a COMPACT_VERTEX
variant the first time a compact chunk is drawn with it, in the background with gfx.vulkan.asyncresources, as the
MODEL_DRAWS one; the variant of the multi draws makes a compact one of its own. Only vertex.vert and cabprobe.vert
decode the normal (compact_frame() in common.glsl); the shaders of shadows, prepass, picking and cube shadows read
position and uv as before.
- Ray tracing: the BLAS of a compact chunk reads the positions with a stride of 12, and the reflections read the normal
and uv from the attributes (RT_FLAG_COMPACT in the record). Not tried with ray tracing on.
- The loader hands the streams of the file to Insert_Compact as they are; the stars keep their colours in the normals
of basic_vertex and go as before.
Measured on Vulkan (self-test, 250 models of the game, runs alternating with legacy): device memory 1.60-1.64 GiB
against 1.89 GiB, GPU time a frame 1.27-1.39 ms against 1.37-1.57 ms, the same frame time and load time, the picture
within 1/255 of the legacy one, no errors of Vulkan in the log. Unit tests 1189/1189; -e4d diff gives the same results
through the new decode. Not built with GCC here.
* fix(render): particle vertex attribute offsets from offsetof
* fix(render): particle vertex attribute offsets from offsetof in the GL 4.6 and Vulkan renderers
The GL 4.6 particles passed 0, 12 and 28 to setup_attrib, the Vulkan layout of
vertex_kind::particle had the stride 36 and the same offsets as numbers. They
now come from sizeof and offsetof of particle_vertex. The Vulkan particle_vertex
moves from vulkan14frame.cpp to vulkan14context.h so the layout in
vulkan14scene.cpp can use it.
A build with static_asserts that each offsetof equals the old number (and the
size 36) compiled; the asserts were taken out after.
* fix(gl46): the loading screen stays until the shaders are compiled, no black window at the first start of a new version
At the first start of a new build (the driver keeps the compiled shaders of each executable apart, and every build has a name of
its own) the window went black and didn't answer for about half a minute after the scenery was loaded. Measured on
calkowo_osobowy with a copy of the executable under a new name: 33 of those seconds were the first step of the water on the
windscreens, which compiled its nine programs (water_*.comp) in the first frame of the simulation.
- After the scenery is loaded the loader keeps its screen, with the bar going and the note on preparing the graphics, until the
renderer says the programs are ready (gfx_renderer::Prewarm_Shaders(), about 50 ms a frame): the programs of the materials
are drawn with once each into a small target of the formats of the colour pass, as the opaque things and as the translucent
ones, then the programs of the windscreen water are compiled one a frame (opengl46_windscreen_water::prepare_next()), which
gpu_init() then keeps. The window answers in between.
- The Vulkan renderer, which has its pipeline cache, says it's all done at once (the default of the interface).
Checked with a copy of the executable under a new name (nothing kept by the driver): the loading screen with the note from the
end of the loading (19 s) to the first frame (58 s), the window answering all the time; the first frame no longer stalls (the
water 12 ms instead of 33 s). With the shaders kept by the driver the preparing takes no time.
No asset changes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(gl46): the missing program of the windscreen water found by find_if, which GCC 13 and MSVC 14.4x compile
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(loading): the notice that the graphics are being prepared at the top of the screen
The notice stood at the bottom left, beside where the loading icon goes, over the trivia and the texts some
of the backgrounds carry at the bottom. It is now centred at the top of the screen on a dark plate, so it
reads on any background. The text and its translation are the same.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* feat(vk14): the loading screen stays until the pipelines of the scene are made, as with OpenGL 4.6
vulkan14_renderer::Prewarm_Shaders() lists the pipelines the loaded scenery draws with most: those of the
programs of its materials for the colour pass of the main view, opaque and blended, and those of the
shadows. With the background threads (gfx.vulkan.asyncresources) they are handed to them, made ahead and
not counted as made late; without them they are made on the main thread for about 50 ms a frame. The
loading screen, with its notice and progress bar, waits for them and for the pipelines of the last
session the background threads make ahead. Before, a pipeline first asked for by a draw either left the
draw out for a few frames or held the frame while it was made.
The images of a viewport are made by make_viewport_targets(), taken out of render_scene() unchanged, so
the main view's formats are known before the first frame. The key and the settings of a pipeline come
from the same helpers bind_scene_pipeline() uses.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(gl46, vk14): the review of #476: the multi draw variants prewarmed with a model block, the last session's list in the progress
OpenGL 4.6: with gfx.gpucull 1 and the multi draws on, Prewarm_Shaders() also draws the multi draw variants
of the material programs. Their shaders read the model block from the storage buffer at
MODEL_DRAW_SSBO_BINDING, which nothing bound before the first frame, so the draw was undefined. The
prewarm now binds a buffer of one model block there. With the default gfx.gpucull 0 there are no such
variants and nothing changes.
Vulkan: the loading screen waits for the background threads, and so for the list of the last session, up
to 4096 pipelines. With a cold cache the bar stood at n/(n+1) all that time and looked stuck. The
pipelines of that list are now counted in the progress as they are done with, made or not. The wait still
ends when the background threads are idle, as before.
make_viewport_targets() returns false without a context, which Sonar reported as a null pointer
dereference. Its callers checked the context already.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QRgQ1LqB4YXWorLDBBL6hD
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>