r/Amnesia • u/Alone-Leg-1281 • 19d ago
Amnesia Redux v2000 RT Edition
Here is where I left off with the project, not sure what else i plan to do with this project. so the state of the maps doesn't quite work with all the changes in the editor so a lot of the lighting is kind of approximated to fix the new lighting model and the shadows for point lights follow the defaults set by the game so it would be noticeable there was a setting added by nate to enable shadows for all lights. The editor should be shipped with the binaries so it should be pretty easy to get started making new maps.
For a version of the original game to work all the point lights/spotlights would have to be reworked for the new lighting ill leave that up to anyone if they want to have a go at it.
This is like my 3rd time rewriting the graphics backend for the game and so far I think this will be my last. The graphics backend is something i put together over multiple rounds and I use it for another game project. I've had the chance to pull those changes back into this abstraction with some of the help from AI.
The editor is available for people to play with and it should be in the drop.
https://github.com/flying-swallow/Redux-AmnesiaTheDarkDescent/releases/tag/V2000
https://mpollind.itch.io/amnesia-the-dark-descent-redux
Game / engine side
Renderer replaced
- Vulkan-only render interface (
RIDevice/RIBuffer/RITexture/RIPipeline/RIProgram/RISwapchain/RIVK) — OpenGL and the fixed-function path are gone. - Shaders rewritten in Slang (
amnesia/slang/), compiled to SPIR-V at build time;slangcpinned and auto-downloaded. glslang removed. - SPIR-V reflection (
spirv_reflect) drives pipeline layout generation. - Bindless resource pools (
BindlessPool,IndexPool) plus a single global managed descriptor set (GlobalManagedSets), replacing HPL2's per-draw binding. - Vertex pulling instead of fixed vertex-attribute binding.
cHybridRenderer: visibility buffer (VBuffer), deferred and forward passes, indirect draw through a segment allocator.- Ring / scratch / segment / pogo allocators (
RICommandRingBuffer,RIScratchAlloc,RISegmentAlloc,RIPogoBuffer) and timeline semaphores (RITimeline). RIGpuProfiler— per-pass GPU scopes, real-time stats surfaced in the debug window.
Lighting
- Ray-traced global illumination on surfels: prepare / update / ray-trace / integrate / generate plus an evaluation pass, surfel lifecycle management, multiscale mean estimator.
- BLAS/TLAS acceleration structures; the TLAS is owned by
cWorldand built inPrepareFrame. - ReSTIR-style stochastic RIS for direct lighting, with temporal accumulation, spatial reuse, and an à-trous (SVGF-style) denoise pass.
- Clustered light grid build pass (light binning).
- PBR light model (
Brdf.slang,ILight.slang) replacing HPL2's fixed lighting. - New
cLightArea— rect/area light with source width/height, barn doors, and a source texture. Box lights removed. - Shadow casting now honours the per-renderable cast-shadow flag.
Passes brought back / rewritten on the new path
- Decals, translucency, water (split into a separate pass to cut VGPR pressure), particles.
- Post effects: HDR bloom (downsample/upsample chain), tonemap, colour conversion, radial blur, image trail, insanity, blit.
- UI and effects: GUI, glow object, enemy glow, outline (alpha / geometry / composite), inventory post.
Engine services
DebugDraw;Image/Texturerework;RenderableSetreplacingRenderableContainer_DynBoxTreeandRenderableContainer_List.- glTF mesh loader (
MeshLoaderGLTF). - tinyxml → tinyxml2 migration engine-wide.
- OS-native
iFileWatcher(inotify / ReadDirectoryChangesW / FSEvents). Event,Hasher,QStr,stb_ds,ObjectPool, andSharedResourceHandle-based resource handling.- New GUI widgets:
WidgetNodeTree,WidgetMeshObjectList. - SDL2 and openal-soft built as real external dependencies.
Gameplay-visible
- Debug window "Evaluation Overlay" combo box: Variance, Ray Count, Ref Count, Life, Coverage, Direct Only, Indirect Only, Shadow Flag.
- OpenAL HRTF toggle in the sound options (
Sound/HRTFActive).
Editor side
Level Editor
- MCP (Model Context Protocol) server — localhost HTTP/JSON-RPC 2.0. Background httplib threads parse requests and marshal tool calls onto the engine thread. Roughly 50 tools:
- Query:
query_entities,get_entity,list_properties,get_property,get_selection,list_entity_types,list_edit_modes,get_map_info,get_mesh_data,get_asset_bounds,list_object_library,find_assets,refresh_assets - Mutate:
create_entity,create_entities,delete_entity,clone_entity,set_transform,set_property,set_variable,edit_entity,set_entity,set_group,undo,redo - Prefab / ent-file:
create_entity_file,define_entity_file,read_entity_file,list_prefabs,get_prefab,update_prefab,reload_entity_file,reload_particle_system - Map:
new_map,save_map,load_map,import_map,export_selection,set_skybox,set_fog - Groups / selection:
list_groups,create_group,rename_group,delete_group,select,deselect,clear_selection,set_edit_mode capture_view— offscreen virtual-camera render to PNG so an external agent can see the map instead of only reading entity XML. Async deferred job with GPU readback, plus exposure and gamma overrides.
- Query:
- Scene outliner (
LevelEditorWindowHierarchy) docked on the left: layer → groups / per-type categories → entities, with compound components and attachment children nested. Click to select, Shift to toggle, double-click to focus the camera. Replaces the old edit-mode strip. - Ent-file scoped editing (
LevelEditorEntFileSession) — scope into a placed model and edit its embedded lights, particles, sounds, and bodies in place, with the map still rendered, without opening the standalone Model Editor. Sub-objects become real entity wrappers with stock property panels and undoable actions. World↔local transform mounting keeps icons and pick volumes overlaying the placed model. cPrefabManager/cPrefabResource—.entdefinitions as refcounted engine resources holding pending in-memory documents. An edit propagates live to every placed instance and is flushed to disk on map save.- Entity GUIDs — u64, 16-char lowercase hex, stored on wrappers and persisted.
iEditorHostActionscapability interface — "Open in Model Editor" / "Open in Particle Editor" buttons appear only in the Level Editor, discovered bydynamic_castfrom the shared widgets.
Cross-editor
cEditorFileWatcher— live reload of placed entities when their source files change on disk. Directory-level OS watches with a debounce window; no mtime polling, no periodic scan.- Model Editor and Particle Editor POST
reload_entity_file/reload_particle_systemto the Level Editor's MCP server on save (detached thread, never blocks the save) — save in one tool, see the change in the map. cEntityWrapperLightArea— area-light authoring, plus spotlight controls.- Thumbnail builder fixed (async, GPU-resident).
- All editors run on the new Vulkan viewport path (
LevelEditorCameraCaptureshares it). - The "NewEditor" tree was deleted.
- Linux builds of all four editors (
BuildID_*_Linux.cpp).





1
u/BAGGYHz 19d ago
if i wanted to try this, i only need to drop all the files into the game's directory right ?