PRAGMATA 3D UI | Reconstructing the Rendering Pipeline in Unreal Engine

The holographic ring and scan beam are world-space effects. They follow the camera projection, interact with the terminal mesh, and enter the linear HDR scene color before Bloom and tone mapping. The blue panel on the right is a screen-space widget. It blurs the display-transformed scene behind it before drawing its thin foreground highlight. Reconstructing the effect in Unreal Engine meant reproducing those inputs and compositing points within a frame.

Muhammad’s frame breakdown traces scene post-processing and UI compositing in PRAGMATA. We used it as a reference to implement the terminal’s 3D UI in Unreal Engine, then used fixed-camera GPU readbacks to verify when the holographic ring, scan beam, and blue panel contribute to the frame. Muhammad’s Behind the Pretty Frames: PRAGMATA

The gradient surface and the thin arcs keep separate geometry, transforms, and material parameters. The surface shader compares fragment depth with scene depth to fade the hologram where it approaches the terminal. The arcs share the ring’s parent transform, with individual position and width controls. The scan beam also has separate emission controls for direct rendering and Bloom. The halo is added to the HDR scene saved by the Display pass before tone mapping, so the beam’s narrow core can be tuned independently of the halo while the metal remains visible beneath it.

The original RenderDoc recording establishes draw order and shader resource bindings. The UE tests use GPU readbacks at a fixed camera. Changing the Bloom input affected pixels outside the beam core. Disabling the blue panel’s target overlay first changed the shared GUI canvas, while the display background stayed the same. The canvas is composited with the filtered background in linear color.

Custom 3D UI Rendering in UE

The holographic ring and scan beam need to render into HDR alongside the terminal surface. The blue panel on the right waits until the scene has been converted for display, then blurs the background and draws its foreground. UE renders the terminal and backdrop, supplying HDR scene color and depth from the same viewpoint. UMG remains the editing interface for control parameters. The project plugin uses these inputs to schedule the world-space draws, scene post-processing, and screen-space composition.

  • Holographic ring geometry and depth fade. The gradient surface and thin arc meshes use their own geometry, transforms, and material parameters while sharing the ring's overall orientation. The surface shader compares fragment depth against scene depth and reduces coverage near the terminal surface. Each arc's position and width can be adjusted independently.
  • Direct scan-beam rendering and Bloom. Separate emission controls set the brightness of the beam core and the intensity of the Bloom input. The project generates a direct HDR base and a separate Bloom input, adds the resulting halo to the base, and then applies tone mapping. The core and halo can be tuned independently, while the terminal's metal surface remains visible beneath the beam.
  • Offscreen GUI rendering and final composition. Early in the frame, live control state updates an offscreen canvas with separate color and coverage. Once the display background is ready, the project filters the scene behind the blue panel, then draws the thin bright lines and other screen controls into a shared GUI canvas. A compute shader composites the result in linear space using alpha, preserving the foreground line edges.
  • Batching world UI and screen GUI draws. Compatible pairs of world-space mesh or sprite draws are submitted once with multiple render targets (MRT), writing the direct HDR and Bloom inputs separately. The screen GUI batches draws where order and render state allow, and reuses the reticle coverage result.

At a fixed camera position, we read back intermediate textures from the same frame to verify depth fade, emission, and blue-panel composition, then compared direct draw counts in each UI interval with the original RenderDoc capture. The UE comparison scene uses the terminal mesh and a backdrop with a similar base color to the original room.

Comparing the Original and UE Frames

The comparison focuses on the ring, scan beam, and blue panel around the terminal. The UE scene keeps the terminal mesh and its material so we can check the beam over metal and the depth fade along the shell. A background plane with a similar base color stands in for the original room. Both views use corresponding camera positions and a 2048×1152 frame. Pixel samples come from matching UI and terminal regions.

文章目录
Original RenderDoc frame and UE reconstruction
Original RenderDoc frame preview on the left, fixed-camera UE reconstruction on the right.

The original captures show a distant interaction prompt, the scan beam reaching the terminal, and the screen grid opening. The UE reconstruction uses the last state because the ring and screen UI are visible together. The captures establish how the effects were drawn in that state. Input handling, state transitions, emitter phase, and interaction logic require runtime evidence.

Terminal display states from the original capture
Crops from the original RenderDoc previews. Each retains its original camera view.

Limits of a World-Space Widget

A world-space Widget Component renders UMG to a texture and samples it with a mesh material. The texture contains composited color and Alpha. When the terminal occludes the component mesh, it occludes the corresponding widget pixels. Epic’s Widget Component documentation

In this setup, the gradient surface and thin arcs share the same display geometry. Drawing them separately gives the surface its own depth fade and each arc its own transform. The beam needs independent emission inputs for the visible core and the halo. The screen panel needs a display-space background to filter before its foreground is drawn. Each operation therefore keeps the data it needs until its own draw or composite.

World-space Widget Component and separate 3D UI draws
The upper diagram shows UMG composited into a texture on one mesh. Below, the examples show scene-depth fading, Bloom compositing, and foreground drawing after background blur.

Draw Order in the Original Game

The game blends the gradient surface into HDR scene color, then draws the thin arcs and scan beam into the same target. Bloom and tone mapping therefore receive scene color that already contains the world-space UI. The screen UI is composited after scene post-processing.

Writing the Ring and Scan Beam into HDR

The gradient surface is submitted as a triangle strip. The thin arcs are separate indexed draws. The surface provides the translucent emission between arcs, and the meshes define their outlines. Both blend into the HDR scene-color render target.

The ring starts at 17_sm72_015_10_005_00.efx. In the Lock group, Action12 references an embedded child EFX through PlayEmitter. Its TypePolygon and TypeMesh entries configure the gradient surface and thin arcs. The extracted child EFX matches the corresponding byte range of the parent file. RenderDoc establishes the actual submission order.

TypePolygon stores the surface transform, UV sequence, shading parameters, and depth-fade settings. 17_Light_003_03.uvs supplies the vertex UVs and references the gradient texture 17_light_003_03_alba.tex. Rasterization interpolates these UVs across the strip. The pixel shader samples radial Alpha from primTex (t2) and multiplies it by vertex Alpha. The soft-depth branch applies an additional fade factor, producing the blend weight between arcs.

TypeMesh references 17_Hologram_003_14.mesh for the arc outlines. The draws share mesh buffers and the shaders VS_StaticMeshNoVelocity and PS_PrimitiveMesh. The vertex shader transforms the mesh to clip space. The pixel shader produces color and Alpha for the HDR blend. Different constant-buffer bindings let each draw position and shade the same geometry separately. UE preserves per-arc transforms and a separate control for gradient coverage.

Repacking the eight UV-derived entries into the captured vertex-input layout produced a byte-for-byte match across the checked 128 bytes. The BC7 mip payload extracted from the TEX asset likewise matched 262,144 bytes of the captured primTex texture. The initial data of the shared arc buffer matched the mesh asset. These checks identify the geometry and texture inputs. The emitter instance associated with each arc draw, its animation phase, and the fade parameters used at a selected pixel remain unresolved.

Parent EFX, embedded effect, and GPU bindings
The UE frame locates the outer ring. The diagram traces the parent EFX into separate UV/texture and mesh bindings. In UE, OuterCircle edits the surface and the OuterArc widgets edit individual arcs.
Eight-vertex triangle strip and matching asset bindings
The strip shows the captured vertex order using schematic positions. The right side shows the UV and gradient texture inputs matched to the original draw.

The scan beam uses separate strip draws writing into the same HDR target. The recorded index counts are 5, 5, and 25. Bindings establish the material resources and render target. Measuring an individual strip’s coverage and HDR contribution at the beam core requires per-draw pixel history or before-and-after readbacks.

The ring’s RGB blend uses One for the source and InvSrcAlpha for the destination. For any color channel, C_src and A_src come from the current pixel shader output. C_dst is the target color before that draw. The output is C_src + (1 − A_src) × C_dst.

The gradient surface blends first. When an arc overlaps it, the destination already contains the gradient contribution. The arc’s Alpha controls how much of that destination color survives. Draw order therefore affects overlapping pixels. The blend state tells us how the pixel shader outputs are used. Texture sampling, material parameters, and coverage inside the shader determine those outputs.

Blending the gradient surface and arc meshes into the same HDR target
The original frame locates the gradient and arc. The worked example blends the gradient first, then the arc. Blend factors come from the capture; RGB and Alpha values are illustrative.

Triangle-Strip Topology and the Arc Meshes

The strip submits vertices in the order 0, 1, 7, 2, 6, 3, 5, 4. The first three form a triangle, and each subsequent vertex adds another. Eight vertices give six candidate triangles, with alternating vertex order to maintain winding. The diagram shows connectivity. The actual positions come from the captured vertex input.

Changing connectivity can change interpolation even when every vertex position matches. A pixel that moves to a different triangle is interpolated from another set of UVs, shifting the boundary of the radial gradient.

For an arc draw, the vertex and index ranges identify the geometry. The bound transform and color parameters explain how that instance differs from its neighbors, and the HDR target identifies the blend destination. The original reuses geometry and shaders. The UE widgets preserve independent arc placement and color.

The captured 512×512 BC7 mip matches the extracted gradient texture byte for byte and can be reused in UE. A matching texture still leaves projection, raster coverage, UV interpolation, and the sampler to check. For a discrepant pixel, verify the shader resource view (SRV), mip, and sample coordinates before comparing the HDR target immediately before and after the draw. The original’s animation phase, exact sample footprint, and individual arc contributions need further readback.

The overlapping edge provides a direct test of this blend. At the gradient draw, the target contains the scene. At the arc draw, it also contains the gradient contribution. An arc can therefore change the output by changing Alpha alone. In RenderDoc, compare the shader’s source RGB and Alpha against the destination from that same draw.

Gradient Alpha and Depth Fade

Projection determines which screen samples produce fragments. The gradient shader samples the radial texture using interpolated UVs and uses that Alpha in the coverage calculation. At the terminal edge it also samples scene depth at the same screen position. As the terminal surface approaches the hologram in depth, the fade reduces the coverage weight.

The original gradient draw binds the texture as primTex (t2), visible scene depth as ReadonlyDepth (t0), and per-draw constants as Polygon3DConstant (cb3). WhitePtSrv is bound at t1. Pixel tracing is still needed to establish which branch samples it at the selected pixel.

Texture Alpha and interpolated vertex Alpha determine the base weight. The positive soft-distance branch divides the depth difference by the soft distance and clamps it to [0, 1]. Both depth values have to be expressed in the same depth domain, and the soft distance uses the same units. The following HLSL illustrates that branch.

// Positive soft-distance branch reconstructed from the original bindings.
float dz = zScene - zPolygon;
float softFade = saturate(dz / softDistance);
float coverage = textureAlpha * vertexAlpha * softFade;
Ring–terminal intersection and a worked gradient Alpha example
The original frame locates the junction. The diagram compares two depths at one screen position. Slots are from the actual binding, and the coverage values are illustrative.

With a texture Alpha of 0.6 and vertex Alpha of 0.8, base coverage is 0.48. At one quarter of the soft distance, the weight drops to 0.12. At or above the soft distance, the fade saturates at 1. The same orange material can therefore blend gently into the shell while the rest of the gradient keeps its texture- and vertex-controlled coverage. The actual soft-distance constant at the original reference pixel has not been read back.

An arc’s source RGB and Alpha affect different terms in the blend. UV sampling and interpolated vertex Alpha determine coverage. Reducing RGB removes the arc’s own color. Reducing Alpha lets more of the existing target color through. Our arc test zeroes RGB and keeps Alpha, isolating the color contribution while preserving the destination weight.

For the UE junction comparison, match the ring projection and the terminal silhouette first. A shifted projection can sample a different part of the same BC7 texture, and a shifted depth lookup can cross the terminal silhouette. Once the covered pixels line up, compare the intensity of the gradient.

How the UI Enters the Frame

In the original recording, PreTone reads scene color already containing the ring and scan beam. Bloom adds its halo back to the post-process HDR texture. Tone reads the updated texture. Background filtering writes to the screen GUI canvas, and CS_GUIMaterial composites that canvas with the display-processed background.

A regular UE world-space widget draws UMG into a texture and displays it with a mesh material. Project settings govern scene processing such as Bloom and tone mapping. Viewport UMG draws by widget order and can use the native Background Blur widget. The stock UE diagram summarizes those responsibilities; the exact passes depend on materials and project settings. Widget Component · Post Process Effects · Background Blur

The reconstruction uses UE SceneCapture for terminal and background HDR plus device depth. From there, project shaders draw the gradient and arcs separately. The scan beam uses separate HDR inputs for the direct image and Bloom. The halo is added to the direct image before Tone.

Tone and display conversion produce the R10 background. The project filters that background before drawing the blue foreground into the shared GUI canvas. CompositeSharedUICanvas interprets each input in its own encoding, blends by Alpha in linear color, and writes back to R10.

Resource flow in the original, stock UE, and the reconstruction
Original Bloom writes back to the PreTone texture. The project builds separate direct and Bloom inputs from the same captured HDR and depth. Screen compositing then reads the filtered background and GUI canvas.

RenderDoc records four draws using PSGaussianBlurFilter into the GUI canvas. Their bound coverage textures include a soft-edged circle, a solid white texture, and a UI atlas. These let the same filter act within different shapes. Per-pixel evidence would be needed to attribute a selected blue-panel pixel to one of those draws.

PreTone Before and After Bloom

To recalculate one arc’s blend, take C_dst immediately before its draw, with the gradient already present. The end-of-frame color also includes later arcs. Source RGB, source Alpha, and the target’s previous content need to come from the same draw.

PreTone reads world HDR and writes the post-process HDR texture. Bloom reduction reads that version and produces an intermediate texture. Bloom final adds the halo back to the same post-process target. Tone reads its updated contents. A readback must identify the texture and where it was read in the pass sequence.

UE PreTone output and HDR after Bloom compositing
Same frame and screen region. Left: PreTone output from the Bloom branch. Right: the halo has been added to the direct HDR image. Both precede Tone and use the source material’s HDR visualization.

Compare the beam core before the halo is added on either side. A readback taken after Bloom includes the halo contribution to neighboring pixels. Adjusting the beam texture at that point can also change a core that was already aligned. If the peak is displaced before Bloom, check the strip’s projection and coverage.

World-space UI enters linear scene HDR alongside the rest of the scene. Emission adjustments affect the input to tone mapping. Screen UI instead changes a later composite with the display-processed background. Identical display code values can come from different operations, so trace the first write and the pass that reads it.

Gaussian Background Filtering for the Screen GUI

PSGaussianBlurFilter reads background color from primSceneTex (t1). A Gaussian filter samples around the corresponding background position, weights the samples by distance, and divides the weighted sum by the total weight. A uniform area retains its color while contrast around an edge spreads to nearby pixels.

In the standard filter below, p is the center, offset[i] is a sample offset in texels, and sigma is the Gaussian standard deviation in the same units. At fixed support, increasing sigma gives distant samples more relative weight.

weight[i] = exp(-dot(offset[i], offset[i]) / (2 * sigma * sigma))
blurredRGB = sum(weight[i] * sceneRGB(p + offset[i])) / sum(weight[i])

The Gaussian kernel determines the filtered color. The amount blended at a pixel depends on coverage. The shader samples the Alpha of primTex (t2), multiplies it by interpolated vertex Alpha, and can apply a depth-fade factor when that branch is active. A soft-edged circle fades the effect at its boundary, a white texture gives full texture Alpha inside the shape, and a UI atlas supplies the widget silhouette. Changing the kernel changes background detail inside the region. The coverage texture controls the region’s shape and edge.

RenderDoc establishes the sampled background, coverage texture, and destination canvas. The formula explains generic Gaussian filtering. The original sample positions, weights, and whether it separates horizontal and vertical filtering still require shader verification.

For the UE blue panel, disabling the target overlay in a same-frame comparison left the display background unchanged. Differences appeared first in the shared GUI canvas, then in the final output. That evidence applies to the fixed UE configuration and establishes where the foreground enters the composite.

The reconstruction follows the observed compositing order. The world UI contributes to HDR before Bloom and Tone. The blue panel reads the display background after those stages. To compare effects between engines, match which pass wrote the resource and which pass reads it. The scan beam’s separate emission settings for Display and Bloom are a specific choice in the UE implementation.

A Custom 3D UI Pipeline in Unreal Engine

Stock UE UI and the Custom Pipeline

The customization concerns where each element enters the frame. The ring and beam enter scene HDR and go through tone mapping with the scene. The blue panel composites after display conversion, so the background can blur without softening its foreground line.

UE provides two relevant options. A world-space Widget Component renders its UMG content to a texture sampled by the component mesh. A screen-space widget can be added with Add to Viewport and drawn in widget order, with Background Blur affecting the content beneath it. Widget Component · Creating Widgets · Background Blur

The stock world widget uses the component mesh for occlusion. Its surface and arc pixels share that depth. Our gradient needs a per-fragment fade near the terminal, and the arcs need individual placement. UMG remains the authoring interface. The project reads scene HDR and depth from UE, then draws those elements with project shaders.

The diagram shows the stock flow above and the fixed-frame implementation below. The project draws separate Display and Bloom inputs and adds the halo to the direct HDR image before tone mapping. Later it filters the display-transformed background and feeds that result and the foreground canvas to the screen composite.

UE widgets, separate HDR draws, and screen compositing
The upper diagram shows stock Widget and viewport UMG. The custom Display and Bloom branches have separate PreTone outputs. After display conversion, the R10 background is filtered and the RGBA8 canvas supplies foreground color and Alpha.

The gradient surface fills the luminous band between arcs, while the arc meshes define the outlines. Separate draws let each arc keep its own position and width. The surface shader reduces coverage where it approaches the terminal.

The widgets supply transforms, geometry, UVs, and material parameters. RenderCurrentWorldUIForPass submits the draws. The gradient shader samples depth from the same view, reduces coverage at a small depth separation, and blends the result into HDR. The arcs are submitted as individual meshes.

Turning off the gradient surface reduced the light between arcs. Zeroing only the arcs’ RGB while retaining Alpha barely changed the region. The local color correction therefore belongs on the gradient surface’s UVs.

The scan beam builds a direct image and a separate Bloom input. Sharing one emission output would make a brighter core also feed more energy to the Bloom filter.

With the same scene and camera, RenderAuthoredFrame saves the Display branch’s PreTone output in AuthoredBloomCompositeBase. The Bloom branch uses its own emission values and PreTone output for extraction and spread. The halo is added to the saved base before tone mapping.

At a fixed camera, setting the main beam and filament’s direct emission to zero left Bloom PreTone unchanged. The first difference at the recorded checkpoints appeared in the combined HDR. Setting their Bloom emission to zero changed the Bloom PreTone output itself.

The blue panel first filters the R10 background, then draws its foreground line into the RGBA8 canvas. If the line is already in the filter input, the kernel spreads its color and broadens the edge. CompositeSharedUICanvas combines the filtered background and canvas in linear color, then encodes the result back to R10.

Changing the order brought the line closer to the original than adjusting brightness alone. With TargetOverlay disabled, the scene and display background stayed unchanged. The first difference appeared in the shared canvas.

The metal visible under the beam is adjusted in M_NativeTerminalScanSurface. Its mesh-local bounds and UV window restrict the correction. The scan widget still controls the beam’s position and brightness.

Scene Depth and UMG Draw Parameters

CurrentSceneCamera captures HDR color and device depth for the same view. The terminal and background supply the base color for the hologram and beam. The gradient shader compares its own depth with the visible scene depth at that pixel. A small separation reduces the weight, fading the orange surface where it approaches the shell. UMG supplies the geometry references, transforms, and material parameters. Screen UI and HUD use the R10 background after display conversion.

Terminal depth, hologram fade, and screen compositing in UE
SceneCapture produces scene HDR and depth. The gradient uses depth for fading, and the world UI blends into HDR. The blue panel composites with filtered background after display conversion.
Element UE authoring entry
Fixed-frame level and scene input /Game/Maps/UI_Hacking16509_Native; CurrentSceneCamera captures scene HDR and depth
Orange gradient surface, thin arcs, cyan panel WBP_NativeEmissionWorld_Authored; use emission bands and attenuation in OuterCircle, Element Transform in OuterArc0–2, and Authored Panel Sampling in CentralMonitor
Main beam and filament HackingBeamMain and HackingBeamFilament in the same widget, each with Terminal Scan Settings
Terminal mesh and junction material SM_Close0_EmissionCPU comes from sm72_015_00.mesh and frame 0 of sm72_015_close.mot. The metal correction is in M_NativeTerminalScanSurface
Screen UI, target overlay, and post-processing WBP_Hacking16509Native, WBP_UI3203Review, and DA_UI16509_PostProfile
UMG fields and draw inputs for the surface, beam, and arcs
UpdateAnchorBeam selects DisplayEmission or BloomEmission for the active pass and stores it in PreviewBeamEmissionGain. Rendering code binds that value for the draw. The arc row traces geometry and transforms.
UMG Designer for the world-space Widget Blueprint
The left shows OuterCircle selected in the actual UE asset. The controls and values on the right come from the same asset readback.

RenderAuthoredFrame in PragmataAuthoredUI.cpp schedules the stages. RenderCurrentWorldUIForPass submits the gradient draw using PragmataWorldSourcePolygon.usf. PragmataExtraBeam.usf receives the beam’s emission values. Screen compositing is handled by PragmataComposite.cpp and PragmataComposite.usf.

The function and parameter names come from implementation indexes and readback records. The available handoff does not include these source bodies. The blend equation above describes the verified GPU state.

Terminal Geometry Provides Visible Depth and Metal Color

The fixed frame uses the terminal’s actual static mesh as opaque geometry. The mesh and frame 0 of the motion asset were converted through an intermediate OBJ before import as SM_Close0_EmissionCPU. The source LOD0 record lists 27,798 triangles, 30,035 referenced vertices, and material IDs 0–7.

This pose establishes the relative positions of terminal and hologram. The opaque mesh writes scene depth for the fade calculation and contributes HDR surface color under the scan beam. The old diagnostic actor SM_StaticForegroundDepthReview and its component are hidden. The terminal mesh and background plane generate the depth used here. Changes to geometry, pose, or camera change that input, so the fade must use the same view’s scene depth.

The UE scene uses a backdrop close to the original room’s color. The original character and room appear in the reference frame. Samples use corresponding visible regions and exclude areas obscured by the original character.

OuterCircle stores the gradient’s fade settings. After Play loads the Widget Blueprint, check the new soft-distance value in that draw’s binding and compare coverage at the same junction. Diagnostic controls and formal assets can have fields with the same name. Editing the asset loaded in Play and finding the first changed texture confirms which value reached the shader.

Geometry Submission and Coordinate Transforms

The gradient and three arcs are editable in UMG. Each draw submits local geometry, a transform, a texture, and material parameters. The shared parent transform gives the whole ring one orientation: seen front-on it is circular, and at an angle all elements foreshorten together. Each arc retains its own local offset and shape. With the camera and mesh origin fixed, the whole silhouette diagnoses the parent transform. An offset relative to the gradient points to the arc’s Element Transform or geometry.

Vertices go from local space to world space, then through View and Projection into clip space. Perspective division and viewport mapping give the pixel position. UVs interpolate over the triangle for fragment emission and coverage. These equations use column vectors. The actual UE matrix order and coordinate conventions follow the bindings for the frame.

p_world = LocalToWorld * p_local
p_clip  = Projection * View * p_world
p_ndc   = p_clip.xyz / p_clip.w
p_pixel = ViewportMap(p_ndc.xy)

If the ring drifts as a group, check the camera, the mesh origin, and the shared transform. If the gradient and other arcs align, check the misaligned arc’s local transform or mesh. Moving the camera would also shift the terminal and beam. The existing comparison holds camera pose fixed; other views require a separate check.

The depth texture stores device depth. The shader must compare both depths in a common domain using a soft distance in compatible units. The UE record confirms scene-depth sampling and the local Display Second Soft Distance By V control. If the whole transition shifts, check depth sampling and the View. If only the lower edge fades over the wrong width, check the V interval and soft-distance multiplier.

Mark both ends of an arc relative to the gradient in the same crop. If they all shift together, check the parent transform. If a single arc endpoint shifts, check its local transform and shape. A fade that starts early can also look like a shift, so compare the UV range and depth fade along the shell.

Hologram Alignment and Depth Fade

Within WBP_NativeEmissionWorld_Authored, OuterCircle stores the gradient and emission, while OuterArc0–2 reference radial profiles and keep individual transforms. Align the shared panel normal and camera projection before correcting a single arc.

Shared transform and per-arc transform under a fixed camera
Left: the parent transform changes the whole projected ring. Right: only the purple arc moves. Dashed outlines are schematic; yaw is from the fixed-frame UE readback.
Earlier comparison of hologram-panel orientation in UE
Historical orientation check. Use the opening UE frame for the final appearance.
Local alignment of the thin arcs
Matching crops compare the arc positions. The final asset stores each arc’s pose in Element Transform.

The gradient has radial texture Alpha. PragmataWorldSourcePolygon.usf also samples scene depth for the fade. Display Second Soft Distance By V supplies a V interval and a multiplier, allowing the lower edge to use a different fade width without altering other parts of the surface. The editing domain is the surface UV; the screen crop is for measurement.

Depth of the hologram surface and terminal
At the same screen sample, scene depth and polygon depth determine the fade factor, which is combined with radial Alpha.
Soft transition near the terminal shell
Original reference and an earlier UE crop show the gradient edge where it approaches the opaque terminal.

Pass-by-Pass Comparison

The original’s Bloom reduction pass generates an intermediate from the HDR written by PreTone. Bloom final returns the halo to that same HDR target, and Tone reads its updated content. The UE implementation draws separate Display and Bloom inputs from the same scene so the sharp beam and its halo can be controlled independently.

Pass-by-pass comparison of the original and custom UE implementation
Original Bloom writes back to the post-process HDR. UE adds the independently generated halo to the saved Display base before Tone. Both screen composites run after the display background is ready.
Stage Original resource flow UE implementation
Scene input Terminal geometry and scene depth guide the hologram draw SceneCapture provides HDR and device depth in R11G11B10 and R32_FLOAT resources
World-space UI The gradient, three arcs, and three scan-strip draws share an HDR color target Widget data supplies transforms, meshes, UVs, and material parameters. Project draws use scene depth for the gradient fade and blend into HDR
Post-processing and display PreTone feeds Bloom, then Tone reads the updated HDR color RenderAuthoredFrame schedules Display, Bloom, tone mapping, and display conversion. DA_UI16509_PostProfile stores post-process settings
Screen GUI Four Gaussian filter draws write the canvas before CS_GUIMaterial composites it A compute shader composites the screen controls with the display-transformed R10 background for the Play viewport

APragmataAuthoredSceneActor::RenderAuthoredFrame starts with the HDR and device-depth textures from the current camera. HDR contains the lit terminal; depth is read by the gradient shader at the shell. RenderCurrentWorldPreBloom connects world UI rendering to RenderCurrentPreTone. The two draws reuse the camera and scene inputs and select parameters for their own branch.

With world UI compositing and Bloom enabled, Display runs first. It keeps its PreTone history in AuthoredDisplayFrame and copies the current result into the R11G11B10 AuthoredBloomCompositeBase. Bloom redraws the world UI with its own emission and PreTone. Extraction and spread read that second HDR image. The halo is added to the saved base. RenderCurrentToneDisplay then produces tone-mapped output and the R10 display background.

The additive composite can be tested in isolation. With both branches active, setting the halo gain to zero should reproduce the direct base. The diagnostic used live UE render targets with history blending set to zero and matched the base bit for bit. Disabling the entire Bloom path can also change the branch conditions and is a separate experiment.

Main beam, filament, and surrounding effects
Earlier UE breakdown used to identify the effect layers. Quantitative readbacks below come from a separate fixed-input test.

BeginSharedUICanvas reads the display-transformed R10 scene for background filtering. When the level actor’s bDrawNativeSceneBlurBeforeScreenGUI is enabled, BlurOnly runs first, the target overlay then draws the blue line, and ExcludeBlur draws the remaining controls. RenderPragmataNativeGUI writes widget color and coverage to the RGBA8 canvas.

The final composite reads the filtered background and RGBA8 canvas. CompositeSharedUICanvas uses PragmataComposite.usf to interpret GUI RGB using canvas Alpha and flags, decode the background into linear color, blend, and encode to R10. UPragmataAuthoredViewport displays the result. Canvas Alpha sets the background weight. The output’s A2 bits follow the storage behavior observed in the original.

Generating the Direct Base and Bloom Input

AuthoredBloomCompositeBase preserves the Display PreTone output, including the scene and the visible beam core. The Bloom branch redraws the same view under its own emission controls. Its PreTone output feeds extraction and diffusion. Tone sees the sum of the base and the halo.

If the composite used the Bloom input as the base, the Bloom gain would affect the core. If extraction sampled the Display base, edits to core brightness would also feed the halo. Read back each branch before adding them to establish where a change starts. The run records authored_display_draws, authored_bloom_draws, and both HDR hashes. Draw counts describe submissions in that configuration. GPU timing is needed to measure cost.

For HackingBeamMain, UpdateAnchorBeam selects DisplayEmission or BloomEmission based on EWorldUIPass. It writes the selected value to PreviewBeamEmissionGain. PragmataWorldRing.cpp binds it for PragmataExtraBeam.usf. CoreGain and FillGain affect the local strip envelope and are uploaded only for Display in the saved configuration.

OuterCircle packs each band’s UV basis, along- and across-band envelopes, and emission. The Bloom draw clears selected Radiance values in the Display, Detail, and Continuation Emission Bands, including the corresponding second-band emission. It restores the two Display-specific soft-distance corrections to unit multipliers. The base geometry, textures, and remaining inputs are still used. Changes to the cleared terms can therefore correct the visible gradient without directly feeding Bloom.

In the conceptual equations, D is the saved direct base, B is the Bloom input, and k is the halo output gain. Keeping both branches active and setting k to zero preserves D. Disabling Bloom entirely can change the branch conditions.

D = PreTone(DisplayHDR)
B = PreTone(BloomSourceHDR)
H = D + k * Halo(B)
Display = DisplayTransform(Tone(H))

The equation describes how the HDR branches combine. Exposure, kernel details, and history are handled within their respective stages. The handoff covers only part of the Bloom filter. To diagnose the core, compare the same point in the direct base and the merged HDR. To measure the halo, sample outward from the core and compare the expanded region at the same crop and exposure.

HDR Intermediate Values and Display Codes

The recorded UE targets native_scene, world_UI, pre_tone, bloom, and tone use R11G11B10_FLOAT. display and final_UI use R10G10B10A2_UNORM. The shared GUI canvas is RGBA8.

HDR values can exceed one. The display target holds quantized code values. Exposure, tone mapping, encoding, and neighborhood operations affect the comparison. A difference can even change sign for one channel after conversion. World UI emission should be compared in HDR; the blue line should be traced through the display background, canvas, and final output. Use matching view, exposure, crop, and sample positions.

The packed float format has different precision across its RGB channels. Near-zero marginal Bloom values are differences of readbacks that have already rounded. The samples support direct emission as the main contribution. Establishing exactly zero Bloom at a pixel would require higher-precision intermediates or a more direct input test.

The canvas Alpha supplies coverage for compositing. The R10 output’s two-bit A2 field follows the observed storage convention and cannot recover the canvas’s original coverage.

UE HDR targets, display background, and GUI canvas formats
Linear blending precedes final R10 encoding. Canvas Alpha and the final A2 field have distinct uses.

Background Filtering and GUI Canvas Compositing

At the edge of the blue line, the display background and foreground canvas both contribute. R10 contains the display-transformed scene and is decoded for blending. RGBA8 contains the blue line’s color and Alpha. The original coverage values are available in the canvas.

The filter takes background input from R10 and uses GUI Alpha to limit its coverage. The background contains the terminal and world UI. The blue foreground is drawn after filtering. Putting that line into the filter input would spread its color and widen the edge, so changing the line’s brightness alone could leave an edge-width mismatch.

CompositeSharedUICanvas decodes background color and uses the canvas Alpha to weight it. Zero coverage keeps the background, full coverage favors the foreground, and intermediate coverage blends the edge. The result is encoded back to R10. In premultiplied terms, the relationship is C_guiPremul + (1 − α_gui) × C_backgroundLinear. The actual shader interprets GUI RGB using Alpha and flags, so the expression describes the blend rather than the storage convention of every canvas channel.

A misplaced or discolored line in the canvas points to its widget input. A correct canvas edge that widens only in final_UI points to the filtered background or the composite. The matched-frame readback shows the orange ring and beam in world HDR and the blue panel’s middle line first in the shared canvas.

Same-frame UE readback of the blue panel and world hologram
Orange arcs appear at the world-UI stage. The blue line appears in the shared canvas and final GUI. Each tile shows its own stage resource; HDR and display brightness are on different scales.

Matching the Original UI Draw Submissions

The terminal UI produces work at two different levels. An earlier UE build prepared separate entries for the direct image and the Bloom input of the world-space UI. For the final build, we counted direct GPU draw commands in the UI portions of a fixed frame.

Record Count Scope
Draw entries prepared by the earlier UE build 1,358 entries World-space UI only. 751 for Display and 607 for Bloom.
Direct draws submitted by the final UE build 247 draws 105 for the early HUD, 36 for world-space UI, and 106 for GUI after tone mapping.

Prepared entries and submitted commands describe different stages of the renderer. To measure the effect of batching, we compare direct draws within the same rendering interval.

In RenderDoc, render-target bindings and the associated command ranges identify where each part of the original UI draws. The early HUD writes to color and coverage targets. The holographic ring, thin arcs, and scan strips draw into world-space HDR. After the display background is ready, the screen GUI filters that background, draws the controls, and composites the result with a compute shader.

Original capture interval Direct draws Draw work in the capture
Early HUD 105 26, 35, and 43 draws across the three color targets, plus one on the coverage target.
World-space HDR 36 17 DrawInstanced and 19 DrawIndexedInstanced calls. The meshlet ExecuteIndirect that shares the HDR target is counted separately.
GUI after tone mapping 106 99 color draws and 7 coverage draws. The CS_GUIMaterial dispatch that combines the canvas and background is counted separately.

UE needs separate emission controls for the scan beam’s bright core and its halo. A mesh or sprite with a matching Display and Bloom draw can be submitted once through multiple render targets (MRT). The same draw writes the direct image and the Bloom input into separate HDR textures. The direct image remains the base for composition, while the Bloom input feeds bright-pass extraction and diffusion. In this test, world-space geometry went from 47 direct draws to 36, with depth initialization counted separately. The hashes of both HDR outputs and the final image matched the unbatched UE implementation. Checking both HDR outputs catches differences that could cancel out in the final composite.

MRT batching for the world-space UI
The UE frame on the left locates the holographic ring and screen grid. On the right, a representative mesh or sprite goes from two separate draws to one MRT draw while keeping separate HDR outputs for the direct image and Bloom.

The screen GUI batches within its existing draw order. The blue panel first filters the background and then draws its thin foreground lines. Batching some overlay and HUD color draws and reusing the reticle coverage on the same target cut this stage from 116 to 106 draws. Nine of the saved draws were color writes and one was a coverage write. In a separate test at a fixed grid phase, combining the visible left and right outlines reduced the GUI count from 107 to 106, with byte-identical final images.

The early HUD also needed its original coverage restored. The earlier UE record contained 61 early draws. Rendering the screen grid subtree into an RGBA8 offscreen canvas and keeping its G8 coverage raised the count to 104 at the tested phase. In the final selected state, the left-hand lines are visible too, bringing the count to 105. The runtime controls still respond to rotation and opacity changes, and the readback matches again when the controls return to their initial state.

Matched test interval Before batching After batching Change
World-space UI 47 36 MRT combines compatible Display and Bloom draws.
Screen GUI after tone mapping 116 106 Batch overlay and HUD draws and reuse reticle coverage.
All three UI intervals at a fixed phase 248 247 In the separate outline test, the GUI fell from 107 to 106 draws and the final images matched byte for byte.

The rows come from independent tests. The last row fixes the grid phase to isolate the effect of batching the outlines.

Over 512 frames in the selected state, the final UE configuration recorded 105, 36, and 106 direct draws in the early HUD, world-space UI, and post-tone-map GUI, respectively. Those counts match the corresponding intervals in the original capture. The comparison covers direct draw counts in those intervals. Per-target routing, the exact animation phase in the original, and full-frame visual parity remain open. Measuring GPU time requires a separate test under matched conditions.

Matching the Result at a Fixed Camera

Each test changes one input and reads successive render targets at a fixed camera, exposure, and sample location. The first changed buffer helps identify what produced the difference. The full frame shows whether it reaches beyond the intended region.

Locating Differences by Render Stage

Read the ring’s color in world HDR. At the scan–metal junction, compare scene color before and after world UI. For the blue line, inspect the display background, shared GUI canvas, and final composite in that order. Use the full frame to locate the regions, then compare the same pixels or sample bands.

For the arc test, zeroing RGB leaves the original Alpha and thus the destination weight. The blue-panel test disables the whole target overlay. It can change coverage as well as the color reaching the next stage, so those tests answer different questions.

The scan beam’s peak also needs to align before colors are compared. In an earlier review the original peak was at y575, and the UE peak at y577. A profile across the beam measures peak position and width. A profile along the beam reveals shading and occlusion as it crosses the terminal. Display-code comparisons use the 2048×1152 frame. Changed-pixel counts in a native GPU crop use the coordinates of that render target.

The tables report RGB mean absolute error (MAE) in the corresponding samples. An improvement in one strip should be read alongside its neighbors. The original final preview supports visual comparison in those regions. Draw bindings and UE intermediate textures provide the additional evidence needed to attribute a change to a pass or material. Reopening the saved level checks whether the settings persist.

Correcting the Color Between the Arcs

The test samples the two gaps in the lower-left ring at a fixed camera. Turning off the gradient surface reduces the red channel in both. Turning off only the arc RGB and keeping Alpha leaves the mean color nearly unchanged. The band remains continuous. The correction therefore belongs in OuterCircle‘s Continuation Attenuation.

UE gradient and arc isolation test
The tiles show the baseline, gradient disabled, arc RGB disabled with Alpha retained, and the final configuration. The markers identify the two sampling gaps.

The final widget restricts attenuation using the gradient’s local Along and Across UV ranges. The selected RGB attenuation is (0, 0.34, 0.28), modulated by the local UV weight. It targets excess green and blue while retaining the red highlight.

The comparison uses the same visible display pixels, with RGB MAE measured in code values from the 2048×1152 frame.

Sample region Before Final configuration Stronger attenuation
Middle of the first gap 6.57 4.35 3.96
Lower first gap 3.13 3.07 3.37
Entire second gap 3.82 3.82 —

Stronger attenuation improves the middle of the first gap but raises error at its lower end. The saved setting improves the middle while largely preserving the lower section and the second gap. The attenuation lives in local UV space; the measurements cover the reference view. A new view needs its own coverage and color check.

Local UV attenuation and measured error
Left: UE sample positions between arcs. Right: display-code error on the same unoccluded pixels at a fixed camera.
Original and UE comparison of the lower-left ring
Original preview, UE before the correction, and the saved result. Compare the band between the arcs and its edge near the terminal.

The Direct Beam and Its Halo

At the same camera and exposure, we separately zeroed direct emission for both the main beam and the filament, then zeroed their Bloom input emission. The records come from three D3D12 runs of 512 frames. The table counts changed pixels within the same native 215×140 crop. The World UI and PreTone rows are from the Bloom draw, so a direct-only change first appears at the combined HDR checkpoint.

Readback stage Main beam and filament direct emission disabled Main beam and filament Bloom input disabled
World UI, Bloom draw 0 566
PreTone, Bloom draw 0 1,097
HDR after direct base and halo are combined 897 28,785
First changed buffers after disabling direct emission or Bloom
The direct base and halo are combined after separate renders. Widths are schematic. Sample coordinates and readbacks are measured.

In the 2048×1152 comparison, pixel (961, 583) sits within the halo. Disabling the direct contribution left both its HDR and final code values unchanged. Disabling the Bloom input produced a baseline-minus-disabled HDR difference before tone mapping of (0.15625, 0.46875, 1.0), and a final display-code difference of (−1, +10, +25). The signs are retained from each stage. The switches affect both the main beam and filament, so the figures describe their combined response.

The gradient surface was also tested under a fixed branch setup. Subtracting the render without the surface from the render with it gave a direct red HDR contribution of about 0.26429 in the OuterArc0 band. The additional difference when enabling the saved Bloom output gain rather than zero gain was about −0.00004. In the first gap, the values were 0.20817 and −0.00073. Near-zero residuals can include packed-float quantization.

The gradient contribution in these regions is concentrated in the direct image. Correcting the hue of the band starts with the surface and its direct emission. To tune the halo outside the core, inspect the Bloom input and the HDR after diffusion.

Direct red HDR and marginal Bloom in the gradient sample regions
With routing and draw order held fixed, compare the marginal contribution with and without the gradient. The direct bars and residuals use the same HDR scale.

Where the Scan Beam Crosses the Terminal

Beam alignment and metal shading have separate controls. The scan widget determines the projected core and filament. The terminal material selects where the underlying tint is allowed to change. Correcting the base color can improve a local error, but it leaves a misplaced beam peak where it is. Match the projection first, then compare color before and after world UI compositing.

The metal beneath the beam is shaded by M_NativeTerminalScanSurface. Its Scan Crossing Finish Tint uses mesh-local coordinates and UVs to select the adjustment. This keeps the warm metal tint editable separately from emission in the beam widget.

Terminal Material Slots and Local UVs

We mapped the sampling window back to the terminal mesh to identify which material actually covers the visible metal. In the target area, 35 samples hit component index 3 and 21 hit index 4. Index 3 binds SourceMaterial_0 and M_NativeTerminalScanSurface. Index 4 refers to SourceMaterial_5. The component index and asset slot name are separate identifiers.

The exported mesh used (X, −Y, Z) for position and (U, 1 − V) for UV. Those are conventions of the comparison export. The initial estimate for U was 0.4125–0.4245. Rechecking the actual surface put the target samples’ 5th to 95th percentile near 0.1477–0.1557. In the earlier UV-only test, target-region changes did not exceed two display codes because the chosen window missed the intended metal.

The saved material combines mesh-local bounds with a UV window of approximately U = 0.1465–0.1570 and V = 0.0055–0.0230. Scan Crossing Finish Tint is approximately (0.25, 0.85, 1.95, 1.0). Those are material values. The final pixel still depends on material evaluation, scene lighting, world UI blending, and display conversion.

The fixed-view comparison shows the color adjustment on the intended metal surface. Nearby pixels changed by up to three display codes. The result covers the sampled material and view; adjacent areas still need to be checked against occlusion and material coverage. Particle highlights and scan filaments continue to come from the world UI draws.

Scan beam and metal contributions at one pixel
The earlier UE view locates the intersection. The diagram identifies the surface material and scan-widget controls.
Aligned crops of the scan core across the terminal
Original preview and UE before and after the material adjustment. Each crop uses the same location. World UI supplies the beam; terminal shading supplies the underlying metal.

At the overlap pixel, read scene HDR before world UI to inspect the metal on its own. Compare the same location after the beam draw to see the change produced by the scan layer. The material is evaluated in mesh-local space and UVs, so the beam can be repositioned independently using its draw geometry.

Blue Foreground Line and Background Blur

The nearby cyan line belongs to the world panel CentralMonitor. The blue panel’s middle line is separate. Disabling the target overlay left the scene through display output unchanged within the sampled area. The first difference appeared in the shared GUI canvas and persisted into the final output. That places the correction in the screen composite, while the cyan panel’s emission remains in world HDR.

Blue-panel filtering, target overlay, and compute composite
The UE crop locates the blue line. The diagram shows the filtered background and shared canvas entering the final composite. Disabling the overlay changed 1,800 pixels in the canvas and the final GUI; earlier stages in the selected region stayed unchanged.
Blue-line test RGB MAE against the original
Before adjustment 31.69
Brightness gain only 26.30
Background filtering reordered 5.48

Within the narrow sample strip, reordering filtering and foreground draws was closer to the original than a brightness change alone. The adjacent grid and cyan edge still differ in the full frame.

Blue-line and background blur before and after reordering
Original crop, initial UE result, and UE with background filtering before the foreground line. Compare the vertical core and adjacent background pattern.

Fixed-Frame Reproducibility and Remaining Differences

Reopening the saved level reproduced the selected frame using its stored widget, material, and render settings. The left side of the figure records two 512-frame D3D12 runs at 3840×2160. The original-to-UE comparison on the right uses 2048×1152. Arc intensity, the halo around the scan beam, and the grid on the right still show local differences.

Full-Frame Comparison and Local Readback

A full GPU readback copies the whole render target. At 3840×2160, single-layer R11G11B10, R10G10B10A2, and RGBA8 textures all use 32 bits per pixel, or about 31.64 MiB each before alignment and compression. At 2048×1152 the same estimate is 9 MiB. Aliasing, alignment, and different per-stage dimensions affect actual memory use. Peak memory, bandwidth, and performance need direct measurement.

The full frame checks composition and whether a change spreads outside its intended area. The native 215×140 crop measures scan-beam differences at individual stages. The 2048×1152 images are used separately for corresponding display-code samples against the original preview. Resampling can alter a narrow arc’s peak, so both coordinate sets are retained.

A saved-level rerun tests whether the configuration reproduces its frame. A GPU readback shows which texture first changes after disabling an input. The original preview supports a corresponding visual comparison. These tests cover a fixed camera. Evaluating GPU cost in motion requires an equivalent-quality, equivalent-feature GPU comparison.

Repeat runs in UE and comparison with the original
Left: checking that the saved configuration reproduces its frame after reopening. Right: corresponding original and UE crops. The figure identifies resolution and scope.

Conclusion

The terminal’s UE-rendered color and scene depth provide the inputs. The ring fades against the terminal shell using scene depth. The beam uses direct and Bloom inputs so the visible core and halo can be controlled independently. The screen panel filters a display-transformed background before drawing its foreground. That ordering brought the blue line closer to the original in the fixed-view test.

The saved level reproduces the fixed frame. Arc intensity, halo spread, and the grid to the right of the blue panel still differ in the full-frame comparison. View-dependent alignment, interaction state changes, and dynamic GPU cost each need separate runtime tests.

Reference

Leave a Comment