Part I reconstructed Diana’s fixed pose and expression in Blender. We brought the models, materials, strands, and camera into Unreal Engine (UE), then compared framing, silhouette, and camera projection between the two applications. Part II uses those same assets and camera. Below, the left image is the original RenderDoc capture’s embedded preview. The right shows our reconstructed render in UE, captured from the matched camera. To locate where the images begin to differ, we replayed a separate capture from the original game. For lighting, strand rendering, and post-processing, we checked the inputs each pass actually bound and the textures it wrote.
This part reuses the character assets and camera from Part I to reconstruct room and character lighting, strand rendering, transparency compositing, and post-processing in UE. Hair can cast shadows on the skin and appear in front of it. From the light’s view, strands can occlude direct light that would otherwise reach the skin. From the main camera, strands contribute to transparency compositing according to their screen coverage and scene depth. Anti-aliasing, tone mapping, and sharpening then process the composited scene color.
Two areas are worth a closer look in the image below. For the dark band on the cheek, we compare the original and UE intermediate outputs in rendering order. We follow the face material, skin lighting, and hair compositing to locate the first difference. At the cuff, a diagonal lock crosses the cuff in the original, but the corresponding strands are offset in UE. We compare their projected positions first, then check whether the clothing occludes the strands. Both comparisons use fixed poses. The simulation article will cover strand updates during character motion.
Contents
- Rendering Pipeline Overview | Deferred Lighting, Hair Compositing, and Post-Processing
- Analyzing the Original Rendering Pipeline in RenderDoc
- Rendering the UE Scene and Integrating Custom Passes
- Face Shading, AO, and Strand Shadows
- How Lighting, Reflections, and Fog Combine
- Strand Geometry, OIT, and Transparency Compositing
- Strand Projection and Occlusion at the Cuff
- Post-Processing and Local Strand Contrast
- Results of the Original and UE Comparison
- Measurement Records and Figure Sources
- How AI Was Used

Rendering Pipeline Overview | Deferred Lighting, Hair Compositing, and Post-Processing
The triptych below shows three rendering stages from a single frame in the regular UE viewport. Every panel uses the same head crop, character pose, and camera. The left panel stops after opaque lighting, when shadows are already visible on the skin. The center shows the frame after strand compositing, so we can see where fine strands cover the forehead and cheek. The right panel shows the final viewport after post-processing. We use the original RenderDoc draws, dispatches, and resource bindings to explain how the outputs at each stage were produced.
The face draw writes Scene Depth and GBuffer attributes for the main view. The light view produces a separate Shadow Map. Deferred lighting uses those resources to calculate opaque scene color. Strand segments are projected into the main view’s screen space. Binning determines which tiles they may cover, and Queue Builder writes their indices to the corresponding candidate queues. Software OIT reads the queues and uses main-view depth to reject fragments behind the face or clothing. Resolve computes strand color and background transmittance from the resulting transparency layers.
In the original replay, OIT Resolve can run before deferred lighting. Their outputs meet at the hair compositing pass, which reads opaque SceneColor along with strand color and background transmittance from Resolve. Post-processing reads the composited scene color for anti-aliasing, tone mapping, and sharpening. This composite is the boundary for the cheek comparison: the output before it shows skin lighting, and the change across it shows the contribution of the foreground strands.
The table follows the resources through one frame. The geometry pass writes scene depth, for example, and the hair transparency pass reads that same depth texture to reject fragments behind the face or clothing. In a stage-by-stage comparison of the original and UE, use the table to find the intermediate result you want to compare. Then trace it to the pass that produced it and the pass that reads it.
| Rendering stage | Inputs | Outputs and downstream use |
|---|---|---|
| Scene geometry and materials | Current UE vertices and indices, textures, material constants, and supplemental attributes as needed | Depth and surface data for lighting, occlusion, and transparency |
| Shadows and occlusion | Geometry visible to the light and a sampling kernel, or camera depth and associated settings | Shadow depth, visibility, or ambient occlusion (AO) read by lighting |
| Deferred lighting and eye shading | Deferred lighting reads surface attributes, lights, and visibility data. Eye shading uses the current eye meshes and shading parameters. | Deferred lighting outputs linear scene color. The eye shading result also goes into later compositing. |
| Strand transparency | Current strand segments, camera, scene depth, shading inputs, and binned tile queues | Layered transparency that Resolve combines into color and transmittance |
| Compositing hair into scene color | Premultiplied strand color and background transmittance from Resolve, plus opaque scene color | HDR scene color with hair composited over the opaque scene, ready for post-processing |
| Post-processing and display | Composited scene color, relevant color history, and display parameters | Viewport image after anti-aliasing, tone mapping, and sharpening |
Opaque Lighting, Hair Compositing, and Post-Processing in One UE Frame

Start with the left and center panels. Lighting on the skin, eyes, and collar is already present on the left. By the center panel, depth testing has determined which strands are visible, and their color has been composited into the scene. Post-processing in the right panel starts with that HDR scene color and operates on the pixels already rendered.
In this viewport test, tone mapping maps HDR brightness into the display range, FXAA reduces jagged high-contrast edges, CAS adjusts local contrast, and OCIO converts the result to the display color space. These steps can all change how clearly fine strands stand out. The center panel uses a fixed display mapping to show the HDR readback in the article. The right panel shows the viewport’s own final output, so the difference between them reflects the full processing chain and both display mappings. To measure a single pass, compare its input and output. A separate set of local rendering records covers the cuff.
Comparing Outputs Stage by Stage
In the left panel of the triptych, there is already a shadow on the cheek, before strand color enters the scene. In the center, a few strands cross the cheek and change its color again. The opening comparison puts the embedded original RenderDoc preview on the left and the UE reconstruction from the matched camera on the right. It shows where the dark band lies and how far it extends. To compare the same patch of skin, we match the camera, framing, pose, and expression. The two views have different resolutions, and each crop has its own origin. We map the marks back to their native textures and take each readback at the corresponding pixel.
The skin’s shading starts with the surface data. Base color, normals, and roughness in the GBuffer describe the patch before lighting. If base color or normals already differ, the material shader’s actual bindings show which textures and vertex attributes it used. If the GBuffer values agree and the skin already differs in the SceneColor before hair compositing, the next place to look is opaque lighting. In particular, we check the AO and the point light’s Shadow Map actually bound by that pass.
When a strand crosses in front of the skin, its color contributes to the pixel and some of the skin color remains visible through it. Comparing SceneColor before and after the composite gives us the change at that pixel. Strand color and background transmittance show how it came about. We can then look at the same location before and after post-processing to see how the existing edge contrast changed.
One detail matters here. In the original replay, OIT Resolve can finish before deferred lighting. The strand result and opaque SceneColor are produced separately, and hair compositing is where both are read together. So we start from the resources actually bound by that composite and check the corresponding texture formats and color spaces in the original and UE. The draws or dispatches that produce those resources, and when they write them, can differ. A replay with a different character pose can still show what a pass reads, how it computes the result, and where it writes. Comparing numbers at the same spot on the cheek requires records with matching poses and projections.
The same approach applies to CAS sharpening. After locating a pass with a differing output, we run it on its own once on each side with a common set of inputs. For CAS, both implementations read the same FXAA output texture and constants, and we compare the values CAS writes. Back in the regular UE viewport, we trace the textures in the actual frame. The texture written by FXAA should be bound to CAS, and the one CAS writes should be read by OCIO. Fixed inputs let us compare shader outputs. The viewport bindings show which textures FXAA, CAS, and OCIO actually used.
Analyzing the Original Rendering Pipeline in RenderDoc
RenderDoc can record and replay a frame’s GPU calls, typically saved in an .rdc file. The left side of the opening figure is the reference capture’s embedded preview, used to compare camera, framing, and final appearance. The shadow and temporal anti-aliasing analyses below use a separate replayable capture with a different character pose.
In a replayable capture, find a draw or compute dispatch in the Event Browser. Pipeline State shows the shader, textures, and buffers bound to the call and which target it wrote. To understand a pass, also find where its output is read. For the cheek shadow, start with the lighting pass that receives the shadow, identify the shadow map it reads, and find the strand draw that wrote depth to it. RenderDoc documentation
The intermediate textures from the original game come from a single replayable derived RDC. To rebuild the capture, we restored the GPU calls in the order indicated by the resource uploads and synchronization in the original record. For each texture, buffer, and render target discussed below, we checked the binding on the corresponding draw or dispatch in that replay.
The fullscreen Resolve draw in the original reads the five-layer texture array written by software OIT and outputs strand color and background transmittance. Upstream, software OIT reads the strand-segment queues and opaque Scene Depth. We follow the same dependencies on the UE side to identify the depth used by hair rendering, the SceneColor written by the composite, and the scene-color version bound by post-processing.
Rendering the UE Scene and Integrating Custom Passes
The left panel of the triptych shows the room, face, and clothing after UE has drawn them. Hair appears in the center panel because the plugin renders the strands next. It queues segments that can reach the same tile. Software OIT writes fragments to transparency layers after coverage and depth tests. Resolve computes strand color and background transmittance, and the composite uses those results to update HDR scene color.
The change from the center to the right panel comes after compositing. The post-processing test takes the HDR scene color at that point and runs tone mapping, FXAA, CAS, and OCIO in order to produce the viewport image. Garment shading, GBuffer format conversion, and merging opaque lighting happen earlier. We tested those operations separately.
The cuff seam shows why we test garment shading separately. The draw uses the UE mesh, with supplemental attributes from the original bound for each render vertex. A mismatch in the tangent data on either side of the seam can leave the cuff silhouette intact while changing the normal computed from the normal map. We read back the depth and surface data written by the garment draw and check which diagnostic passes consume those outputs.
When the lit garment color differs, we first compare GBuffer base color at the same cuff pixel. If the base color differs, we check the textures, UVs, and material parameters used by the material pass. We compare shading normals separately. If they differ, we check the normal map and the tangent basis bound by the shader. Finally, we verify the surface attributes read by the lighting pass and the lights contributing at that pixel.
Matching Vertices at UV Seams and Writing the GBuffer
Vertices on either side of the cuff seam can occupy the same position. The silhouette can look right even though the two sides have different UVs and tangent bases. UE draws the face and clothing with the camera saved in the level. The garment draw reads positions, UVs, and indices from the Static Mesh. The supplemental Vertex Stream supplies the original normals, tangents, and tangent signs. Both streams must agree on the render-vertex indices UE actually submits.
With a mismatched index, the shader can interpret the Normal Map with the basis from the other side of the seam. That changes the normal written to the GBuffer while leaving the silhouette in place. The difference becomes visible when deferred lighting reads the changed normal.

We pick a target pixel on the garment in the original capture and use RenderDoc’s Pixel History to identify the draw that wrote it. In Pipeline State, we inspect the bound vertex data, textures, and constants, along with sampler state, blend state, and Render Target format. After integrating the shader in UE, we give both implementations the same inputs and compare the output at the target pixel. Matching geometry and depth still leaves texture filtering, blending, and target precision to check. Two Render Target formats can round the same floating-point result differently.
The fixed-input replay compares shader outputs. In the regular UE viewport, we also check the actual resource bindings of the draw or dispatch in that frame. Identical shader bytecode can still read different normal data, constant buffers, or history textures. GPU readback lets us check the values written by the call, then verify that the downstream pass reads the texture it produced.
The original RenderDoc capture provides a reference image and intermediate resources for isolated replay. Some tests reuse the original supplemental garment vertex data, fog settings, and AO parameters. Scene Depth and History Color come from the UE viewport.
If the dark band on the cheek is already visible before hair compositing, we check the point light that illuminates the skin. We recompute the same pixel using Shadow Map depth from before and after the strand write to measure how much direct light the hair blocks. For strands visible in front of the cheek, we check the main camera’s OIT output and compare color before and after compositing. The segments actually submitted in the light view determine which strands write shadow depth. See AO Visibility Comparison and Direct-Light Shadows for the close-up and sample positions.

The Garment Draw Binds a UE Mesh and Original Tangent Data
The character’s clothing still uses the UE Static Mesh. The garment draw reads vertex positions and UVs from the UE Static Mesh and assembles triangles from the Index Buffer. A separate supplemental Vertex Stream supplies the original normals, tangents, and Tangent Sign.
Before attaching the stream, we matched vertex positions and triangles in the fixed pose. We then followed the indices actually submitted by UE to check that each position, UV, and tangent basis belonged to the same render vertex. Vertices on a UV seam can share a position. An index mismatch can leave the cuff silhouette intact while causing the Pixel Shader to interpret the Normal Map using the tangent basis of an adjacent triangle.
The garment material uses separate Constant Buffer Views for UserMaterial and the original material constants. For the draw under inspection, we identify each field from the byte offsets the shader actually reads. Texture bindings also distinguish views for one-, two-, and three-dimensional resources. Several views can refer to the same texture, while the number of samples depends on the sampling instructions executed by the Pixel Shader.
After the garment pass writes its color, the merge pass checks geometric coverage and scene depth to determine where it can update the scene. The write mask marks pixels the garment pass wrote. The merge mask marks pixels that pass the visibility checks and can update scene color. If the cuff and forearm project to the same pixel and the arm is in front, the merge skips the garment write and leaves the scene value in place. A and B in the UE crop illustrate both cases.
In the same 3840×2160 test, the garment pass wrote 1,192,432 pixels. After geometric and depth checks, the merge updated 1,136,160 pixels. We use the difference of 56,272 pixels to locate regions where the visibility conditions excluded a write. If a triangle appears to be missing, we inspect the geometry actually submitted by the draw through its Index Buffer.

After connecting the garment material, we checked whether lighting could use the surface properties it wrote. The garment shader uses MRT (Multiple Render Targets) to write several textures in one pass. On fixed inputs, one texture matched in all four components. The others needed to be compared using their own encodings. For a normal, for example, decode it, transform it into the required coordinate space, normalize it, then encode it in the target format. Roughness and classification fields have their own encodings. Differences close to floating-point precision showed no clear discrepancy in these samples.
Back in the regular viewport, we checked the View and format bound by the next pass to confirm that it read the newly written texture. Color history was sampled separately across consecutive frames.
To trace the cuff in RenderDoc, pick a target pixel on the cuff surface and use the garment draw to identify its vertex stream and texture. Then compare the garment mask, Scene Depth, and merge target to see whether the garment updated that pixel. For hair at the same coordinates, we check whether the depth resource bound by the transparency pass represents the cuff at that pixel. We then compare the projected strand fragment’s depth with the depth of the cuff surface. This gives us separate data for garment color, cuff silhouette, and strand position. The same per-pixel trace works for other parts. Find the draw or pass that wrote the resource and check what ultimately overwrote it.
To check why a garment pixel was eligible for a merge, compare the garment write mask, the current Scene Depth, the merge mask, and the final render target. If the garment pass wrote to a pixel but the merge mask excludes it, read the current depth to identify the visible surface. If the depth test and merge mask disagree, check the visibility tests at both stages and the exact versions of the depth and color resources bound to the merge pass. The same check can explain why garment color overwrote part of a hand or forearm.
Hair Compositing and SceneColor
The regular viewport uses the GBuffer, Scene Depth, and HDR SceneColor generated in the current frame. Strand rendering first uses Scene Depth to reject fragments occluded by the face or clothing. Hair compositing reads SceneColor from opaque lighting, adds strand color from OIT Resolve, and retains a portion of the opaque scene color according to background transmittance. Post-processing then reads the composited HDR SceneColor. The table follows these stages through their inputs, write targets, and downstream uses.
The table lists the resources read and written by the regular viewport passes and by the isolated tests. The PostOpaque conversion outputs surface attributes, while the SceneCapture lighting test updates the scene color for that capture. Hair rendering in the viewport starts with segments and depth and updates SceneColor at compositing. ReplacingTonemapper identifies the separately validated post-processing chain. The regular viewport test also enabled CAS. The later binding analysis follows the FXAA output into CAS and the CAS result into OCIO.
| Rendering stage | UE hook | Reads | Writes and purpose |
|---|---|---|---|
| Garment shading and merge | Garment material test | UE mesh, supplemental vertex stream, original material resources, and current opaque depth | Writes garment surface attributes and a mask, then merges only pixels that pass the visibility check. |
| GBuffer format conversion | PostOpaque, after opaque rendering | GBuffer A/B/C, scene depth, and HDR before hair compositing | Material attributes, base color, and normal textures for the test shaders. SceneColor retains its existing value. |
| Opaque lighting composite | SceneCapture experiment before hair compositing | Current camera parameters, converted GBuffer, HDR before hair compositing, and test reflection inputs | Updates RGB in the test SceneColor and preserves alpha. |
| Binning | Regular viewport, before strand rasterization | Strand segments and the main camera | Finds which tiles each projected strand segment may cover. |
| Queue Builder | Regular viewport, after Binning | The tile assignments for the segments | Writes the candidate segment indices for each tile and prepares the indirect dispatch arguments for software OIT. |
| Software OIT | Regular viewport, after tile queue construction | Candidate strand segments, tile queues, and Scene Depth | Depth-tests strand fragments that cover the pixel and writes passing fragments to the transparency layers. |
| OIT Resolve | Regular viewport, after software OIT | Transparency layers written by software OIT | Computes premultiplied hair color and background transmittance. |
| Hair compositing | Regular viewport, before post-processing | Resolve output and opaque HDR SceneColor | Multiplies scene color by background transmittance, adds premultiplied hair color, and writes the composited HDR SceneColor. |
| Tone mapping and display transform | ReplacingTonemapper experiment | Composited HDR scene color, test constants, and color lookup table | Intermediate tone mapping, FXAA, and CAS outputs. OCIO converts the result to display color. |
The PostOpaque format conversion must agree with both the writer and reader. The diagnostic version writes three surface targets as R10G10B10A2, R8G8B8A8 sRGB, and R10G10B10A2. Downstream shaders read them via Shader Resource Views (SRVs). Sampling an sRGB view converts the color, while normal and roughness components are quantized by the target format. With all other inputs fixed, 4,350 pixels differed from the composite using floating-point intermediates. To repeat the test, keep the input and readback point fixed and check encoding, resource view, and sampling to find the first pass where those values diverge.
For this conversion, the texture format changes the numbers the shader sees. A linear n-bit UNORM channel has 2^n possible stored values. A write quantizes the value, and a read maps it back to the 0–1 range. The nearest-rounding model below uses x for the input component and q for the stored integer.
M = 2^n − 1
q = round(clamp(x, 0, 1) × M)
x_read = q / M
An input of 0.5 reads back as 128/255 from an 8-bit channel and 512/1023 from a 10-bit channel in this example. sRGB color channels also undergo a color-space conversion. An sRGB SRV decodes them to linear RGB for the shader. Normals and roughness have their own encodings. At the same pixel, these checks help trace a difference to write precision or to the view used for reading. Direct3D color-space conversion
Shader Resource Bindings and TAA History
The main camera and the point-light Shadow View use separate projection matrices. The main view can advance its sampling phase each frame, and the shadow filter can select constants with an independent counter. To compare their inputs, we use the shader’s actual accesses to identify the buffer, byte offsets, and resource version, then check which pass wrote those fields. A whole-buffer hash includes fields the shader never reads, while selecting camera parameters by name can miss fields it does read. The access range determines whether to compare the entire buffer or a subset of its constants.
A point light can sample layer 2 of a Shadow Map texture array. A Resource View can select a different array slice, mip level, or interpretation format even for the same underlying texture. When tracing a dark cheek pixel, we therefore record the resource, the selected subresource, the sampler, and the projected receiver coordinates. Across passes, the content version also matters. Resolve reads the five transparency textures after software OIT has written them. A readback between the clear and the writes contains the initial values, so the readback event must follow the writes before comparing Resolve outputs.
UE’s Render Dependency Graph (RDG) manages transient textures for the current frame. Scene Depth and SceneColor are produced by the frame’s draws. TAA reads History Color across frames, so that texture persists and must be registered with the next frame’s graph. When inspecting a history read, we also verify which view produced the texture.
If a discrepancy appears only after reopening the viewport, check whether the new render graph still holds a reference to a transient resource from the previous graph. After a camera switch, also check whether the history texture was refreshed for the new View. In the same run, read back the same region of the texture twice, once after the producer finishes writing and once just before the consuming pass reads it. The two readbacks show whether both passes saw the same version of the texture.

Face Shading, AO, and Strand Shadows
Zoom in on the cheek and the dark band is already there before hair compositing. The point marked in the close-up lies on the skin. We followed the lighting at that point to a point light and its bound Shadow Map, then used the lighting shader’s sampling method to calculate visibility at the same receiver with depth from before and after the hair write.
Later, fine strands near the part cross some of the same skin. Recomputing from the shadow depth explains the change in the light reaching it. Comparing the colors before and after the hair composite shows what the foreground strands add.
Skin GBuffer Data and Light Bindings
Consider a screen pixel that corresponds to the cheek in the main view. The opaque pass writes the visible facial fragment’s depth to Scene Depth and stores surface attributes such as base color, shading normal, and roughness in the GBuffer. Deferred lighting uses those attributes to shade the skin. If a strand near the ear covers the skin at the same pixel during hair compositing, SceneColor also includes the foreground strand’s contribution.
The per-pixel comparison starts at the facial draw that writes the sample. We record the corresponding mesh triangle and depth, read the GBuffer normal at the same screen coordinates, and check the lights and resource bindings used by the lighting pass. Aligning the render targets before and after lighting, the SceneColor before and after hair compositing, and strand coverage at that pixel shows where the difference first appears. The pre-composite lighting output isolates the lit skin, while the color and coverage comparison across the composite shows the effect of foreground strands.
The GBuffer shading normal comes from material evaluation. With a conventional tangent-space normal map, the texture sample is decoded to n_ts and transformed into the coordinate space used for lighting with the tangent basis. In the equations, N is the mesh normal, T is the tangent orthogonal to N, and s is the tangent sign. The cross product and s determine the bitangent B. Expanding n_ts in the T, B, N basis and normalizing gives the shading normal N_shading.
B = s × normalize(cross(N, T))
N_shading = normalize(n_ts.x × T + n_ts.y × B + n_ts.z × N)
Flipping s reverses the normal component along the bitangent. The same skin pixel can therefore show a shifted highlight even if its base color matches. In the captured pipeline, compare the normal the material wrote with the normal lighting decoded. The coordinate space, texture decode, and GBuffer packing still come from the bindings in that run. Khronos tangent-basis convention
When light culling works per screen tile or spatial cell, the candidate light list stores indices. Each index selects the position and parameters in a separate buffer. The same light may have a different index across runs, so we resolve each recording’s index against its own table before comparing light position, parameters, and Shadow Map. In a fixed-input replay, replacing the index list while leaving the parameter buffer from another run can select a different light. We retain the index lookup location and both resource bindings so we can confirm that the two buffers came from the same run before comparing shader outputs.
The main view, shadow view, and post-processing passes use their own projection parameters or sampling offsets. Check the representation of the offset first, such as pixel units, normalized coordinates, or homogeneous coordinates. Add the ViewRect origin to the crop coordinates to address the full depth texture, and apply the pass’s pixel-center convention when sampling. Even a half-pixel offset can move a sample across a shadow edge. The three skin receivers in this test were located using their actual view and projected coordinates. The opening original-versus-UE comparison locates the sampled area on the cheek.
Original Face Shader Integration and Cheek Pixel Comparisons
The original has a softer transition along the cheek band, while the boundary is sharper in UE. Shading normals, roughness, AO, direct-light shadows, and strand transmittance can all affect that edge. We mark dark, edge, and lit samples in the fixed-camera image and record their full-frame pixel coordinates. Then we use the draw that writes the GBuffer, its mesh primitive, and interpolated UV to identify the skin surface. The compressed embedded preview at the start locates the feature and serves as an appearance reference. Numerical samples come from a separate replayable capture and use its pose and inputs.
The early UE surface integration could render the face, but the transition from the eyes to the cheek still differed from the original. We tested a second version with the original face shader running under UE lighting. The center and right panels show the early integration and the original shader under UE lighting, respectively. The lower row enlarges the eye area, the sides of the nose, and the cheek. Compare the two UE panels first, with the original preview on the left as a visual reference. To investigate the remaining cheek differences, check AO and point-light shadows before hair compositing.

Deferred lighting often fills the screen with a fullscreen triangle. The fullscreen primitive covers the viewport. To identify the facial surface at a sample, inspect the draw that wrote the skin depth and GBuffer, and use its mesh primitive and interpolated UV to identify the corresponding skin triangle. When the pose changes, the same screen coordinates can move from the cheek onto hair or onto another mesh. To compare the same skin point across poses, use topology and local UVs to identify it, project it in each frame, then compare the lighting at those pixels.
AO Visibility Comparison and Direct-Light Shadows

AO (Ambient Occlusion) estimates how nearby geometry occludes ambient light. SSAO (Screen-Space Ambient Occlusion) uses screen-space data such as depth from the main camera. A point-light shadow compares Shadow Map depth with the skin receiver’s depth in the light view and uses the result to attenuate that light’s direct contribution. To analyze the band, we check the draw that writes shadow depth, the lighting shader’s shadow samples, and the AO value sampled at the target pixel from the bound resource. Comparing post-processing input and output at the same location isolates its effect on the tones.
When inspecting a cheek pixel, start with two lighting terms. L_point is the unoccluded contribution of one point light, including the material response and light attenuation. V_shadow is its visibility from the Shadow Map. L_ambient is an illustrative ambient term, and V_AO is ambient visibility. Keeping just these two terms makes it clear where each visibility factor applies.
L_direct = V_shadow × L_point
L_indirect ≈ V_AO × L_ambient
L_skin ≈ L_direct + L_indirect
These equations explain the readback using a reduced model. The actual skin color also includes other lights and rendering terms. In the dark sample below, the drop from 0.6911 to 0.1657 belongs to this point light’s V_shadow. It explains the change in that light’s direct contribution. To measure the AO contribution, inspect the AO actually bound by lighting and the corresponding scene color. Epic on AO and direct lighting
The AO test compares the material visibility input, an earlier full-branch diagnostic, and a candidate based on the original implementation in the same crop. Visibility is already lower around the eyelids and lip seam in the material input. The two later panels also show changes around the face contour, ear, and collar. To quantify AO’s effect on skin color, we still need to compare the AO actually bound by lighting with the SceneColor before hair compositing in that same frame.

The point-light test uses a separate replayable original RenderDoc capture with a different pose from the main comparison. At three skin receivers, we read projected coordinates, depth, bias, and the rotation value. We reproduce the average of eight samples using the same shadow map and sample locations. The average is the visibility factor of this point light at each receiver.
This lighting pass uses a full-screen triangle. The pixel shader reads the GBuffer, scene depth, and the shadow map at t14, then writes HDR scene color to RT0. The shadow map shown above represents depth as grayscale from 0–1. The cheek image uses fixed exposure and HDR display mapping. At this point the skin already receives hair shadows. Hair color enters in the later transparency composite.
At the dark sample (1796, 700), visibility was 0.6911 with the depth before the strand write and 0.1657 afterward. The edge sample dropped from about 0.9169 to 0.4313, and the bright sample from about 0.8484 to 0.6992. These are unitless factors for the same point light. The calculation excludes other lights and the final display mapping. The strand shadow therefore reduced this light’s direct contribution to the dark sample.
The eight sample locations follow the receiver’s light projection and rotation phase. d_r is receiver depth in the light view, d_i is the shadow-map depth at a filter location, and b is the bias scale for this test. Each term is saturate(exp2((d_r−d_i)/b)), clamped between zero and one, and we average the eight terms. Both depths follow the original program’s projection convention. Use the same rotated positions and phase when retesting, or the same formula can sample neighboring texels.
Eight samples can touch more than eight texels. One filtered d_i can use several neighboring texels, and successive samples may share some of them. We logged the texels used by the dark receiver alongside the draws that wrote depth at those locations. Some depth values differed by resource version, so the report retained the individual reads. The eight-sample average at each of the three receivers matched the readback. A different point on the face needs its own sample locations, texture version, and texel footprint because projection and filtering can change there.


The shadow-map draw submits 103,570 vertices for 51,785 segments. Its buffer view can hold 436,975 records, while the draw arguments set the actual workload. The dark sample uses 23 texels, of which 20 have matching depth in the two reads and 3 differ by resource version. The visibility change comes from replaying the same projection and filter with the depth before and after the strand write. The conclusion applies to the three inspected skin receivers.
Point-Light Shadow Integration and Skin Receiver Tests
In the original test, the strands write the Shadow Map from the point light’s view. Deferred lighting reads that same slice and filters the depth comparisons to determine how much of the light reaches the skin. We also tested point-light shadow integration in UE. The dark band still differs in the matched-camera comparison at the start. Explaining that appearance requires checking the main comparison’s projected geometry, filter phase, ambient lighting, and post-processing history.
The original Shadow Filter selects between two sets of sample constants using a phase counter. UE initially used a static table, and we later tested both tables. Besides the constants themselves, the comparison needs to account for the frame on which the counter starts, when it advances, and which View is bound when the table changes. Fine strands cast narrow shadows, so a small shift can put a sample on the other side of a depth discontinuity. A static table makes the samples repeatable while the counter behavior is checked separately. Both sets are identifiable in the original replay, but their timing and the switch on each frame still need a corresponding runtime recording.
For the measurement, we traced the skin lighting pass to the Shadow Map slice sampled by the point light and recomputed visibility with the depth before and after the strand write. In the original capture, direct-light visibility dropped most at the dark sample. It also fell at the edge and lit samples. In UE, we started with a static table for repeatable comparisons and then tested both original sample tables. The opening dark band still differs, so its sampling phase and projection need to be checked in the main comparison.


We tested Wrinkle Weights separately for the dark area on the cheek. The original shadow capture used weights that differed from the saved Blender expression. We held the geometry fixed, changed only the weights, reran the original shader, and read back several render targets. The normal and color of the selected dark pixels stayed the same, while normals changed elsewhere on the face. For the dark spot, we could keep the expression fixed and continue with the point light’s Shadow Map and the receiver samples. The effect of wrinkles elsewhere still needs to be checked against the material output, surface conditions, and lighting at the relevant position.
To verify a light’s contribution at a pixel, identify the corresponding mesh surface. Then use the Light Index, depth, and Stencil state to check whether that surface enters the direct-light calculation for the selected light. Deferred Lighting may involve several lights, masking Passes, and indirect submissions. The number of Draws in RenderDoc, the number of times an individual Pass runs, and UE’s aggregate Draw Call count measure different things. The values here come from recomputing one point light at three skin receivers using the captured depth, light parameters, and bindings. Other lights need to be checked against their own lists and shadows.
When you select a child event of an Indirect Draw in RenderDoc replay, a resource can still show the value it held before the full call completed. If you only see the result of a Clear, find where the call completes and where the next Pass binds the resource. Save the depth or Render Target before and after the write to establish which Buffer version the later Pass actually read. On another frame, the same byte offset can point to a different command, so match the arguments to the call range for that frame. When tracking a specific pixel, record the writing Draw, its output resource, the consumer, and the Shader branch that ran.
Reconstructing Deferred Projected Spotlights
The performance benefit comes from reusing material evaluation and limiting the area shaded by each light. Skin and clothing write their surface properties to the GBuffer once, and all five lights read them back. Each draw rasterizes one light cone, with Stencil further restricting which surfaces receive its light. The smaller the cone’s screen-space footprint, the fewer pixels need a lighting calculation for that light. The first light also samples a dynamic shadow map. The other four skip that read. Where several cones overlap on screen, each light still shades the overlap separately. GPU Gems 3 on light volumes and Stencil
In original frames 2802 and 20377, five projected spotlight draws follow the base Deferred pass that writes the lighting buffer. Each draw rasterizes a light cone and evaluates the distribution inside it using the light’s parameters and projection texture (Light Cookie). The first light uses the DeferredProjectionSpotLightPS variant that reads dynamic shadow depth. The remaining four use a second variant.
We scheduled those five draws in the UE plugin in the original order. The cone bounds the draw on screen, and the Stencil Test limits which surfaces can receive the light. The Pixel Shader reads surface data from the adapted depth and GBuffer of the current UE view. It uses the original light constants and Light Cookie to calculate direct lighting. Each draw uses additive blending to add its contribution to the R11G11B10 lighting buffer. After the fifth draw, Apply8858 reads the accumulated result.

The original first light’s Output Merger state shows a front-face Stencil comparison of Equal and a color blend of One / One / Add. Direct light that passes the test is accumulated in the R11G11B10_FLOAT lighting buffer. RenderDoc pipeline state (cropped)
Before each light draw in UE, AddCopyTexturePass copies the full R11G11B10 lighting buffer from the previous stage into a new target. The draw then adds that light’s contribution to the copied values. The cones limit the area shaded by each light, and the five full-size copies still consume GPU memory bandwidth. The packed outputs match in the fixed-input test. Measuring the total GPU time requires a separate test.
A UE Spot Light can also project a pattern through a Light Function Material. Eligible light functions can be baked into an atlas shared across views. In these five original draws, each light binds its own parameters and projection texture, with the first light also sampling dynamic shadows. This suits setups where a small number of local projectors shape specific areas of illumination. GPU time has yet to be compared at matched lighting settings and resolution. Epic’s Light Functions and Atlas
The point-light samples above came from the base Deferred pass. To inspect the first projected spotlight, we followed its shader to the dark cheek pixel (1796, 700) in a derived replay of original frame 20377. The shader takes eight depth samples from the Shadow Map, calculates visibility at each sample from the stored depth and the skin receiver depth, then averages the results. The GPU reported a visibility of about 0.05353. Multiplying by that factor took the light’s red HDR contribution at that pixel from 9.70477 to 0.51951.
Once the draws were connected in UE, we checked each light’s output. We ran the original Vertex Shader and Pixel Shader with the actual UE view’s depth, GBuffer, light constants, and accumulated lighting from the previous stage, using the previously verified Stencil eligibility for the face. For each of the five passes, all 158,955 visible face pixels matched word for word in the packed R11G11B10 output. This comparison covers the face samples under fixed inputs. Full-scene Stencil coverage and whole-frame equivalence for original frame 2802 remain unverified.
We then isolated the first light in one UE frame. Both runs kept the shader and its other inputs fixed. The only swap was the sampled shadow depth, which we took from after the character meshes had written depth but before the strands did. At the dark cheek pixel (1703, 690), visibility rose from about 0.00033 to 0.78125. The depth written by the hair therefore reduced the direct light reaching that part of the cheek from this spotlight. These visibility values apply to the first light. The dark band in the final image also depends on the other lights, hair compositing, and post-processing.
How Lighting, Reflections, and Fog Combine
The spotlight at the cheek accounts for part of the dark sample. The walls and surfaces facing away from the lights also receive indirect light from GI, while reflective surfaces use screen-space reflections. The projected spotlights accumulate in the direct-light buffer read by Apply8858. Indirect light and the separate reflection texture also enter the opaque scene-color composite.
Fog has another consumer. It is integrated along the view rays in the camera frustum, and both the opaque composite and strand shading can sample the result. To explain a difference in the image, we can compare each intermediate resource first, then see whether the difference shows up only once the results are combined.
GI Probes and Temporal Feedback
Wall surfaces facing away from the lights still receive illumination. The GI output is where we look for that part of the result. The project records show two sets of probes. World-space probes store positions, index mappings, and irradiance. Screen probes correspond to the current view. Indirect lighting reads half-resolution surface data and uses history to stabilize the result. The Surfel Irradiance update writes back to a cache that subsequent frames can read.
UE runs these passes for the current view, and Apply8858 reads the indirect-lighting output. If a wall or a surface in shadow differs, we can read back its indirect light separately from the point-light shadow on the cheek.
Half-resolution input reduces the number of surface samples processed at this stage. Probes and temporal caches reuse indirect-lighting work, but probe coverage and interpolation can cause light leaks around thin walls, and temporal accumulation affects response to lighting changes. Lumen also reuses lighting data. It starts with Screen Traces, uses software or hardware tracing when the screen trace misses, and can look up lighting at the hit through the Surface Cache. The comparison covers how the two methods look up and update indirect lighting. Image quality and GPU time still need a matched-scene test. Epic’s Lumen technical details
Screen-Space Reflection Classification, Intersection, and Denoising
The reflections in original frame 20377 can be traced to FFX_SSSR_Intersect. The pipeline builds Hi-Z, a depth hierarchy, from scene depth, then classifies work and prepares indirect dispatch arguments. Intersection searches screen depth for reflection hits. Coarse levels cover larger steps, and the search moves to finer levels near a surface. Jittering the ray directions gives rough surfaces glossy reflections and introduces noise. Reprojection, prefiltering, and Resolve then turn these samples into a reflection texture consumed by Apply. AMD FidelityFX SSSR algorithm
In one captured Resolve, roughly 1.57 million pixels were written to a texture with roughly 2.07 million pixels. Those numbers describe output coverage in that pass. The amount of ray-intersection and denoising work depends on their respective indirect dispatches. UE’s native SSR faces the same limits of depth and color available in the current image. Lumen Reflections can also trace scene geometry outside the screen for reflections. Epic’s SSR documentation · Lumen technical details
Integrated Volumetric Fog for Opaque Surfaces and Strands
Original frame 20377 writes volumetric scattering into a 160 × 90 × 128 frustum grid. The capture contains a particle injection call, and the volume readbacks before and after the call are identical. After integration along the view rays, shading samples accumulated scattering and transmittance at the surface depth. Transmittance attenuates the surface or strand color, and accumulated scattering is added. A strand and the garment behind it can sample the same volume texture at the same screen pixel, using the depth positions corresponding to each surface.
The UE reconstruction runs the volume shaders with the current camera and lighting data. The opaque composite and strand shading sample the same result. The volume lighting is computed once for reuse, with depth resolution limiting detail and temporal accumulation trading noise for response time. UE’s native Volumetric Fog likewise uses a frustum grid and temporal reprojection. The grid dimensions here come from frame 20377. The fog settings for original frame 2802 still need separate verification. Epic’s Volumetric Fog documentation
Strand Geometry, OIT, and Transparency Compositing
Take one fine strand in front of the forehead. Once the plugin generates its vertices, Binning checks which tiles its projected segments may cross. Software OIT (Order-Independent Transparency) then checks whether a fragment covers the target pixel and passes the opaque scene depth test. Fragments that pass enter the transparency layers. Resolve computes strand color and background transmittance, giving the composite what it needs to show the strand together with the skin behind it.
Generating Dense Strand Vertices from Guide Curves
Part I imported an Alembic Groom with 11,284 curves and used UE’s native Groom renderer to inspect the hairstyle and strand widths. Native Groom binds materials by strand group and uses UE’s Hair shading model. In the final viewport shown here, the custom hair pass reads strand vertices from a buffer supplied by the plugin. The buffer contains points along each strand’s centerline, connected in the same order as the source curves. Together they form line segments that can be updated each frame. Epic’s Groom material documentation
The plugin reads rest strand curves from the package’s .strands file and binding data for the Guide Strands from its .sbd file. The packaged LOD 0 contains 17,500 curves. Guiding uses the guide positions, orientations, and binding data to evaluate dense-strand vertex positions. For instance, when a rest strand vertex is offset to one side of a guide, its local offset transforms with the guide’s orientation.
To test Guiding separately, we fixed the positions and orientations of the guides and used a UE RDG Compute Pass to read the rest curves and bindings. The readback contained 436,975 dense-strand vertices. We checked both the original plugin coordinates and their converted UE coordinates. Binning uses the UE coordinates for main-camera projection, while hair shading at this checkpoint reads plugin coordinates. Both buffers preserve the same segment topology, so the same segment index locates the corresponding endpoints on either side. The test checks whether rendering can consume the vertex output from Guiding.

How a dense vertex follows a guide. The UE port’s NativeHairGuiding149607.usf starts 64 threads per group. Each thread computes its vertex index as GroupId.x * 64 + lane, checks the valid range, reads the low 16 bits of the neighbor records at t9–t11, and unpacks FP16 coefficients from t12–t14.
[numthreads(64,1,1)]void MainCS(uint3 G:SV_GroupID,uint F:SV_GroupIndex){PragmataHairGuiding149607(G,F);}
In the neighbor branch, the shader subtracts the guide’s rest reference position from the dense vertex’s rest position. It rotates that local offset by the change in orientation, then adds it to the solved guide reference position. One candidate is P_guide_deformed + rotate(Q_delta, P_strand_rest − P_guide_rest). The shader accumulates candidates with their valid weights. One branch also divides by the accumulated weight. HairGuiding149607_ue.ush stores a 16-byte record at u0. The first three words hold position and the fourth preserves the input payload.
U0[v24].Data[(0)/4+0]=asuint(v1787);
U0[v24].Data[(0)/4+1]=asuint(v1788);
U0[v24].Data[(0)/4+2]=asuint(v1789);
v1792=float4(asfloat(T6[v24].Data[(12)/4+0]),0,0,0);
v1793=v1792.x;
U0[v24].Data[(12)/4+0]=asuint(v1793);
How UE hands the vertices to Binning. PragmataHairGuidingCandidate.h binds the output to U0 and dispatches Guiding. The actual dispatch statements below have been reformatted. A subsequent compute pass transforms the positions into UE coordinates. Binning reads those vertices at t1 and binds segment indices separately at t0. The low 28 bits of each index word identify the first endpoint, and the next vertex is the second. Guiding updates the centerline positions while retaining the source connections.
P->U0=G.CreateUAV(Native);
TShaderMapRef<FPragmataHairGuiding149607CS> CS(GetGlobalShaderMap(Level));
FComputeShaderUtils::AddPass(G,RDG_EVENT_NAME("PragmataNativeGuiding149607"),CS,P,FIntVector(4320,1,1));
At endpoint 141436 of segment 132535, original frame 20377 records guide indices 27, 48, and 5 and low-half coefficients of about 0.55176, 0.17798, and 0.19971. The output position is approximately (−0.0798728, 0.3510216, 0.0212170). An isolated Guiding rerun with that frame’s inputs produced 6,991,600 bytes that matched the original shading input at t9 and software OIT input at t1 byte for byte. In a separate matched-input test, the original and UE matched all 1,747,900 32-bit output words after 60 solver steps followed by Guiding. Each result applies to its own inputs and run conditions.
Guiding writes the strand vertices. On a root-to-tip curve, points P0, P1, and P2 form segments P0–P1 and P1–P2. The main camera projects each segment, and Binning uses its projected extent to build a candidate list for each Tile. The software OIT pass then checks whether a listed segment covers the target pixel and whether an opaque surface, such as the garment, blocks it. The diagram zooms in on one Tile to show why a segment can be listed without contributing to the pixel. The cuff section applies the same checks to the captured frame.

Strand Binning and Tile Queues
The viewport organizes segments by Tile. Say projected segment A crosses Tile 0 and Tile 1, while B crosses only Tile 1. Queue Builder writes [A] for Tile 0 and [A, B] for Tile 1. When software OIT reads the list, it still checks whether each segment covers the pixel being processed. A fragment that covers the pixel then goes through the scene-depth test to see whether an opaque surface blocks it.
| Rendering stage | Reads | Writes | Next consumer |
|---|---|---|---|
| Binning and Queue Builder | Projected strand segments | Binning finds the intersected Tiles and Queue Builder writes their candidate segment indices | Software OIT reads the segment lists by Tile |
| OIT fragment writes | Tile queues, strand data, and opaque depth | Fragments that pass coverage and depth tests, stored in transparency layers | Resolve reads the layers |
| OIT Resolve | Transparency layers from software OIT | Strand color and background transmittance | Scene compositing reads both |
| Transparency composite | Opaque HDR scene color, strand color, and background transmittance | HDR SceneColor with hair | Post-processing reads the composite |

Take a strand over the blue cuff. The strand and the cuff can land on the same screen pixel. Scene depth determines which is in front. A strand fragment contributes to transparency only if it passes the depth test. The composited pixel includes the hair’s own color and part of the cuff’s scene color transmitted through it.
Binning uses a projected segment’s extent to decide which Tiles it might touch. Queue Builder writes its index into their queues. Software OIT then reads the indices, current-frame segments, and main-view opaque depth one Tile at a time. To enter a transparency layer, a fragment must cover the pixel and pass the depth test. Resolve reads those layers and writes the hair color and the fraction of background light that remains visible for compositing.

log(1+count).A hair segment has two endpoints, but it covers a finite width on screen. Binning uses the projected bounds to identify candidate tiles. The software rasterizer then uses the segment’s position and width to determine pixel coverage. Coverage tells us whether the strand reaches the pixel. Scene Depth tells us whether skin or clothing blocks the strand fragment there. The Guiding compute shader ends at the vertex buffer. The drawing stages handle coverage and depth testing.
In original frame 20377, a separate compute shader, calcShading, evaluates hair shading. It binds two material constant buffers, b4 Material and b7 UserMaterial, and three 1D color gradients at t21–t23. The captured constants include an index of refraction, hm_IOR, of about 1.55 and a hm_primaryRoughness value of 0.25. The color map at t24 was bound, with VAR_Use_ColorMap set to 0. The binding list alone cannot show that a texture contributed to the hair color.
calcShading writes its results to u0 RWShade. The software OIT pass binds that same buffer at t5, with a 4-byte element stride in both views. Geometry and shading arrive as separate inputs. t0 binds the compact segment indices, t1 binds the strand vertices, and t7 binds opaque depth. The UE reconstruction also shares one integrated fog texture between the hair and opaque surfaces, with strands sampling it at their own depth. The registers here come from the original replay. UE’s bound material constants still need a separate readback.

How the shader computes color and highlights. calcShading reconstructs a unit tangent T from the endpoints and adjacent vertices. It decodes the root-to-tip sampling coordinate from the vertex payload, samples three gradients, then selects a color using a random value and cumulative thresholds derived from the color weights. The example direct-light branch computes dot products of T with the light direction L and view direction V. It also compares L and V projected onto the plane perpendicular to the tangent. This extract from HairShade99388_ue.ush retains the port’s variable names. v1995 is one longitudinal response that is combined with other scattering terms, light intensity, and visibility.
v1944=dot(float3(v210,v211,v212),float3(v668,v669,v670));
v1945=dot(float3(v210,v211,v212),float3(v334,v335,v336));
v1946=(v1945+v1944);
// ...
v1990=(v1987+v1946);
v1991=(1.000000e+00/v1370);
v1992=(v1990*v1991);
v1993=(v1992*v1992);
v1994=(v1993*asfloat(0xbf38aa3b));
v1995=exp2(v1994);
The endpoints of the same segment, 132535, produce 0x9426cce5 and 0x8aa4aca3 in RWShade. They decode to RGB (25.25, 22.25, 12.0) and (12.375, 10.625, 5.25). Both packed words match at the corresponding positions in software OIT’s t5 input. The readbacks verify the combined endpoint shading at the buffer handoff. Contributions from individual lights or highlight terms were not read back separately.
The software OIT compute shader stores fragments that pass coverage and depth tests. The Resolve pixel shader reduces those layers to premultiplied hair color and background transmittance, and the compositing pass uses both to update HDR SceneColor. At the cheek, compositing can change the color of a pixel where a strand crosses in front of skin. Strands written into the light-view shadow map can reduce the direct light reaching the skin earlier, during skin lighting.
How a segment covers a pixel. drawLines decodes a segment index, subdivision count, and subsegment index from the tile queue. It evaluates the curve using both endpoints and their neighbors. The parameter interval between adjacent control points is the fourth root of squared distance, and missing neighbors are extrapolated. Width comes from the low 16 bits of the fourth vertex word. The shader divides by 65535, interpolates along the subsegment, applies the material width scale, and converts it to the screen scan scale using the local change in projection.
After projection, the rasterizer scans along the screen axis with the larger change. The fractional position on the minor axis assigns coverage weights to adjacent pixels. The following extract from HairOIT149440_ue.ush shows one side. v888 is the clamped width times the minor-axis weight. After the tile boundary check and reversed-Z opaque depth test, coverage times hair color gives premultiplied color, and 1 − coverage gives the fragment’s transmittance.
v885=frac(v877);
v886=(1.000000e+00-v885);
v887=saturate(v857);
v888=(v886*v887);
// ...
v904=LayerDepth[v902];
v905=(v904<v859);
// ...
v907=(1.000000e+00-v888);
v908=(v888*v851);
v909=(v888*v852);
v910=(v888*v853);
How four color layers hold more fragments. Each pixel has four group-shared color slots. The first three use InterlockedMax on packed keys and pass the lower-priority entry to the next slot. The fourth merges farther fragments and commits the update with an atomic compare-and-exchange. For premultiplied color C and transmittance T, merging a front and back entry gives C_front + T_front × C_back and T_front × T_back. The extract below shows the tail merge and commit. Global u0 also inserts color and transmittance into layers 0–3, merging overflow into layer 3 before requantizing. Layer 4 holds two auxiliary words. The approximate tail result can vary with atomic arrival order.
v994=(v993*v993);
v995=(v994*v964);
v996=(v994*v967);
v997=(v994*v970);
v998=(v995+v982);
v999=(v996+v985);
v1000=(v997+v988);
v1001=(v975*v994);
// ...
InterlockedCompareExchange(Layer[v953],v977,v1022,v1023);
From a queued segment to a nearby pixel. In original frame 20377, tile (104, 30) contains segment 132535. Queue word 0x6a0205b7 selects subsegment index 6 of 10 subdivisions. Recomputing the projection on the CPU from the captured endpoints and neighbors gives approximately (1670.369, 484.143) to (1669.281, 491.845), about 0.169 px from the center of pixel (1669, 491). The GPU readback at layer 0 of that pixel contains 0x8824048a, 0xf74573a6. It decodes to premultiplied RGB (9.25, 8, 4) and transmittance of about 0.424. The queue, vertices, and pixel record are captured values. The projected subsegment is a CPU reconstruction. Attributing any stored fragment to this segment still requires a per-fragment GPU trace at this pixel.
The original game uses two methods for rendering strands in the main view. Software OIT reads strand segments from screen-tile queues and generates transparent fragments. Triangle rasterization submits strands as triangles and can write color, motion vectors, and depth. The draw arguments show whether any triangles were submitted in a given frame. The count can be zero.
When checking motion data, we identify the draw or dispatch, verify that it ran, then inspect what it wrote and which later pass bound its output. Motion vectors and other data may come from the triangle draw. The cuff section examines the software OIT strand queues. To verify what the triangle draw outputs, check its own execution record and resource bindings.
When tracing an Indirect Dispatch, identify the clear, write, and read of the argument buffer. Its values can all be zero between Clear and the end of Queue Builder. At the software OIT dispatch, read the actual buffer binding and byte offset and check the resource barrier if needed. For an empty Tile, first check whether work was submitted. Then look for the target segment in the queue and test whether it covers the pixel. If the viewport produces output but the readback is empty, check that the copy took place after the write. Logging each value at the point where it was observed tells you which step to inspect next.
The original dispatches software OIT through ExecuteIndirect and writes a five-layer 3840×2160 R32G32_UINT texture array at u0. The fullscreen Resolve pixel shader binds that array at t0 and writes packed results into a separate single-layer R32G32_UINT texture. In this replay both OIT and Resolve run before the lighting calls described above. Hair compositing reads the Resolve output and opaque SceneColor together.

The fixed-input test takes the five-layer OIT texture array read back from UE, runs the original Resolve on them, and compares its output with UE’s Resolve output. The handoff record reports a match across the 1344×1960 comparison region. This test covers the Resolve output with the five layers held fixed. Segment rasterization and fragment writes are upstream stages.

Compositing multiplies the background color by transmittance and adds the hair color, written L = H + τB. H is the premultiplied hair color, B is the linear color of the opaque scene, and τ is the fraction of the background that remains visible. Use the linear output to check the equation, and account for the render target format. An R11G11B10 float target, for example, rounds on write, so a hand calculation can differ from the readback in the last digits. Screenshot RGB also includes exposure and tone mapping. To measure transmittance, read the corresponding Resolve output and compare it with the background color and composited HDR.
Standard alpha compositing gives the background transmittance from fragment opacity. Take one pixel and sort the fragments that passed the Scene Depth test from front to back. Let α_i be the opacity of fragment i and c_i its linear color before premultiplication. When compositing a layer, the cumulative transmittance τ of the layers in front weights that layer’s color contribution.
H = 0, τ = 1
For each fragment i, front to back:
H ← H + τ × α_i × c_i
τ ← τ × (1 − α_i)
L = H + τ × B
For layers with alpha 0.4 and 0.5, background transmittance is 0.6 × 0.5 = 0.3. This demonstrates the color and transmittance relationship in standard compositing. The original implementation stores color and transmittance in four layers and auxiliary values in layer 4. Fragments beyond capacity merge into the tail. W3C alpha compositing equations
At one cuff sample, (1440,1327), transmittance was about 0.621315, premultiplied hair color was (3.3125, 3.1875, 2.6875), background color was (3.25, 3.5625, 3.5625), and the HDR output was (5.3125, 5.375, 4.875). The control uses a fixed region and the same linear color scale. For the red channel, 3.3125 + 0.621315 × 3.25 ≈ 5.33. The small difference from the observed value is within the precision of the format. When a region gets darker, check whether H dropped, τ increased, B became darker, or several changed together. Reading hair color and transmittance separately helps distinguish a loss in coverage from a change in the color of the strands already present.

Software OIT stores a limited number of fragment layers at each pixel. When fragments update the same location concurrently, the order of atomic operations can affect the merge. In one replay, two executions produced the same near-layer results and set of contributing fragments. The remaining fragments merged in a different order, changing both the tail color and the Resolve output.
This observation comes from one region of that output. To see whether scattered differences elsewhere have the same cause, run the pass repeatedly with fixed inputs. Save the near layers, tail fragments, and merged results separately. Then compare which values vary between runs and which differences recur. Use the same sample coordinates and the same output definitions for each run.
When feeding the same data to the original and UE Resolve passes, match each layer’s format and write order as well. The earlier black-and-white image flags pixels where the selected packed field in the first layer is nonzero, so it locates pixels with fragment records. Scene compositing reads the hair color and transmittance from Resolve. To see why a strand fades, check the transparency-layer record, resolved Alpha, and composited color at the same coordinates. The first output that changes tells you where to look.
Comparing Resolve Outputs with Fixed Transparency Layers
When outputs differ, first hold the five-layer texture array and Resolve parameters fixed and compare two runs. If the output is repeatable, go back to software OIT and inspect the segment queues and scene depth that it read. For a regional readback, keep any neighboring pixels the algorithm needs and the complete queue entries for the relevant Tiles.
Hair LOD Capacity, Submitted Work, and Pixel Coverage
For the hair workload, we log the source point count, the segment count submitted by the view, and the number of covered pixels separately. Changing the View or LOD can leave the file capacity unchanged while altering which segments are used and how far they extend. The report keeps the actual indices, Dispatch arguments, and measurement region. In the separate cuff experiment, both sides submitted the same first 171,613 segments in the same order so we could pair their projections by index. The original light-view submission of 51,785 segments came from another Draw. Coverage also depends on the camera projection and depth. One segment can cross several pixels, and several segments can overlap at one pixel.

Read the arguments written by Queue Builder alongside the geometry range submitted for that view. An indirect argument Buffer can store multiple commands, each at a different byte offset. We read [2612,1,1] at offset 32 and checked the call to confirm that this was the Dispatch Group Count for Queue Builder. Software OIT reads its arguments from a different offset. If a readback is zero, check whether it was taken just after Clear or after the arguments were written. Keep source capacity, submitted workload, and pixel coverage separate so a workgroup count is never confused with the number of strands drawn.
If a strand segment is missing from the image, start with its source geometry index, read both endpoints, and project them into the target View. Use that projected position to find the Tile and check whether Binning and Queue Builder put the segment in its queue. Then read the Scene Depth bound to the transparency pass for that View and compare the strand fragment’s depth near the target pixel with the garment surface depth. Record the projected position, the queue index, and the depth test result separately. A segment can be near the target pixel and in the queue, yet sit behind the cuff. A failed depth test and a missing queue entry can leave the same background color. The depth value and the queue record tell you which happened.
Strand Projection and Occlusion at the Cuff
A diagonal lock crosses above the cuff in the original. We can identify the corresponding segments in both UE tests, but they project away from the original position. With the matched segments projected into the same frame, we can measure the shortest distance from the target pixel center. For a segment close to that pixel, we also check whether its index is in the corresponding tile queue and compare the strand depth with the cuff depth. These readbacks distinguish a projection offset, an unqueued segment, and a fragment occluded by the clothing.
Projected Strand Segments and Tile Queues from the Matched Camera
The target is the diagonal lock above the cuff on the right side of the image. We select corresponding segments in the original and UE, measure the shortest distance from their projection to the target pixel, and check for the segment index in the Tile. If the segment reaches that area, we compare its fragment depth with the cuff. A segment passing to the side and a segment sitting behind the cuff can both leave the same gap in the coverage image. Screen distance, queue membership, and depth distinguish the two.

All three views use the same camera position. The diagonal lock sits differently from the original in both UE viewport tests. The segment records below show that some target segments had already projected outside the sample region around the cuff before transparency ran.

The coverage image includes every strand that contributes to a pixel. Even when the diagonal lock misses the pixel, a neighboring strand can cover it and leave the total coverage close to the earlier value. We use the target lock’s segment projections to check its position and the coverage image to measure how much hair overlies the pixel in total.

To test whether the cloth occludes the missing hair, compare the strand’s screen projection with the cloth depth. Check whether the segment reaches the target region first, then compare the strand and cloth depths from the camera.
In the earlier test, we kept the queued geometry and crop fixed and relaxed only the clothing depth test. Of the 4,781 pixels that could be matched directly, the 283 low-coverage pixels under examination still did not cross the original coverage threshold. Repeating the count with a higher threshold also yielded no additional passing pixels. This result applies to that queue and crop. The later 4K comparison therefore moves upstream of OIT and measures matched segment projections to see whether they reach the cuff sample region.
A nearby short strand can keep coverage similar at a cuff pixel. We read both endpoints using the source segment index, project the segment, check its Tile queue, and then read Scene Depth from the same View. That follows an actual segment from projection through depth testing. When the diagonal lock and a short strand both approach the same part of the cuff, we identify their geometry by index and measure each distance to the target pixel. An increase in coverage can then be traced to the original lock or to a different strand passing nearby.
For this set of cuff data we matched the original and UE segments first, then used the projected endpoints to find the shortest distance from each pixel to the segment. For pixels with a color change in the transparency coverage, we checked the Tile queue and opaque depth from the same camera and the original readback coordinates. Even if coverage increased at a neighboring pixel, we could identify whether it came from the diagonal lock being tracked or from another strand crossing the same part of the cuff.
Segment Distance and Depth Testing in 4K Screen Coordinates
The cuff test uses the original reference and UE data from a locked camera. The derived replay used to analyze individual passes comes from a separate capture. We project matched segments into one 3840×2160 pixel coordinate system with the origin at the upper left, X increasing rightward and Y downward. UE segments are first transformed to the reference coordinate basis and then projected into 4K pixel coordinates using the saved camera and projection matrices.
For each target pixel, we find the closest point on the projected segment to the pixel center. A match requires the distance to be less than 2 px, the segment index to be present in the corresponding tile queue, and the closest point to pass the reversed-Z depth test. The segment counts as a match at the target location when all three conditions hold.
The 2 px condition can be reproduced from the two projected endpoints. A and B are the segment endpoints in screen coordinates, and P is the target pixel center. Find the projection parameter t, clamp it between the endpoints, then measure the distance from P to the closest point Q. The equations assume the projected endpoints do not coincide.
D = B − A
t = clamp(dot(P − A, D) / dot(D, D), 0, 1)
Q = A + t × D
d_px = length(P − Q)
d_px < 2 only tests how close the segment projection is to the target. A passing distance still needs the Tile queue and opaque-depth checks. This threshold belongs to the cuff comparison. The software OIT pass evaluates actual strand rasterization coverage separately.
| 50 target samples | Earlier original reference | UE comparison | UE cuff experiment |
|---|---|---|---|
| Median projected distance (px) | 0.75 | 27.51 | 44.86 |
| Passed distance, queue, and depth tests | 50 / 50 | 0 / 50 | 0 / 50 |
These 50 points were selected to track the target lock at the cuff. Its segments are still displaced on screen in both UE runs. Even where nearby strands increase local coverage, the target lock needs its own check.
To see whether the diagonal lock reaches the cuff, start with the segment projection and Tile queue before OIT. If the strands reach the target location, post-processing can still change the contrast of the visible fine strands. TAA blends reprojected History Color with the current frame’s color. CAS increases contrast between existing bright edges and their neighboring pixels. We read back the same region after compositing, after TAA, and after CAS. That shows where contrast first changes and whether to inspect the history input, the sharpening step, or the segment geometry.
Post-Processing and Local Strand Contrast
Some fine strands are visible after the hair composite and show up as faint edges in the final viewport. We work with pixels that already have strand coverage. We first compare the current color and reprojected history used by TAA at those points, then read the tone mapping, FXAA, and CAS outputs from the same UE frame. With the sample points held fixed, we can see which stage lowers edge contrast and how much of it comes back during CAS sharpening.
Reprojecting Color History in TAA
TAA (Temporal Anti-Aliasing) reads scene color after hair compositing. It reprojects the current pixel into the previous frame, samples History Color, and blends it with current color. A pixel covered by a fine strand in the current frame can still sample the cuff color from the previous frame. To see whether contrast dropped during TAA, we confirm strand coverage first and then compare the reprojected history with the TAA output. If the history sample resembles the cuff background, we hold the current frame fixed, replace only the history input, and read back the same pixel.
A simple blend shows how history can change the color of a fine strand. Define the motion vector m as current screen coordinates minus previous-frame coordinates. For a current pixel at u, the history sample position is u_prev. C_hist is the reprojected color after history validation, and w is the history weight.
u_prev = u − m
C_out = (1 − w) × C_current(u) + w × C_hist(u_prev)
If u_prev samples the cuff’s background color, increasing w pulls the output toward that color and can reduce the contrast of a fine strand in the current frame. An actual TAA pass can validate the history sample, constrain it using the current neighborhood, or adjust the blend weight. The equation explains why we change only History Color in the test below. For the original game’s weights and history validation conditions, refer to the shader and its readbacks. TAA reprojection, validation, and accumulation
Strand Coverage Before TAA and the Effect of Color History
Fine strands beside the face look softer in the original, and the bright edges are more pronounced in UE. Work back from the display result through CAS, tone mapping, TAA, and hair compositing. TAA reduces flicker by blending current color with color reprojected from a previous frame.
A stationary UE viewport can build up several frames of very similar history, while an original frame captured after character motion can sample history from another patch of skin or cloth. Even if the same strand is present in both current frames, the contrast in their history can change the blend. Confirm that the strand exists before TAA, then measure how much the output changes.

We tested TAA separately in a replayable original capture. Across 246,120 pixels already covered by hair, we measured each center pixel’s relative luminance difference from the average of its four neighbors and took the median of the absolute differences. The current color measured 0.118003, History Color measured 0.045966, and the original TAA output measured 0.047701. Replacing only History Color with the current color gave 0.118501. The metric is dimensionless and describes local contrast within the sampled region. When the original shader read lower-contrast history, its output also had low contrast. The fixed-input rerun shows that history color affects the result in this region.
The second test uses only the top 2% of pixels by local contrast in the TAA input. Once selected, those coordinates stay fixed across every output. Picking the brightest strands anew in each image would mix a change in the sample with the change caused by TAA. Median contrast at the selected pixels fell from 0.871283 to 0.206799 and returned to 0.863403 when we replaced History Color with the current color. The first test includes all target pixels with hair coverage. This one selects those with the highest input contrast. Both use the same replayable original capture. A complete History Color is still unavailable for the opening reference preview.
Post-processing integration and TAA testing in UE
In the UE post-processing experiment, ReplacingTonemapper reads the composited HDR scene. Tone mapping uses the current HDR color and a 3D lookup table, followed by Fast Approximate Anti-Aliasing (FXAA), CAS-style Contrast Adaptive Sharpening, and the OpenColorIO (OCIO) display transform.
UE’s PragmataFXAAView.cpp inserts an RDG compute pass between FXAA and OCIO. MainCS in NativeCAS.usf calls PragmataCAS in CAS_port.ush and writes an R11G11B10_FLOAT UAV. The UE HLSL was transcribed from the original DXIL. The standard viewport test configuration enabled the pass, and the plugin defaults to off. The standalone comparison program runs the original DXIL directly.
We also checked TAA with a fixed-camera SceneCapture. The camera projection cycled through eight subpixel offsets. At each step we read the current offset from the actual View matrix and subtracted the difference in jitter between adjacent frames from the Motion Vectors. That lets history reprojection use unjittered coordinates. The isolated test held current color, history color, depth, and the adjusted motion vectors fixed while we checked what the temporal pass wrote. The regular viewport settings were recorded separately and can be checked against the corresponding View.
Inputs and Outputs of the Original Tone Mapping Pass
The original tone-mapping Pixel Shader reads HDR scene color through t1, uses the depth and exposure inputs, and writes the result to RT0. FXAA and CAS each read the preceding pass’s output. The two color textures alternate as input and output across these passes, so the call bindings and write events identify which version of the color each stage reads.

x/(1+x) on the HDR input before sRGB conversion. The right clamps the pass output to 0–1 for display as 8-bit RGB.CAS-Style Sharpening After FXAA
In the original replay, the Compute Shader after FXAA has entry point CAS_CS. Its two uint4 constants, a five-tap cross kernel with contrast calculated from the green channel, and the 1+4w normalization all match the sharpening-only mode in AMD FidelityFX CAS. The original divides the color by 128 before filtering and multiplies it by 128 afterward. The equations below retain that step. The capture identifies the algorithm. The SDK version used by the original game remains unverified. AMD FidelityFX CAS source code
The original recording, the RDC replay verification, and both the standard UE viewport and 4K comparison were verified on an NVIDIA GeForce RTX 5070. We keep this pass to reproduce the original sharpening and its effect on the strands after FXAA.
For one output pixel, CAS reads the center C and its four cardinal neighbors N, S, E, and W from the FXAA output. The original divides all five RGB samples by 128 before filtering, giving the range used in the following calculations. The fast branch derives a sharpening weight from the minimum and maximum green values across those samples. It applies that same weight to R, G, and B, using the matching channel from each neighbor.
The pseudocode below gives the mathematical form. C and the four neighbors are already normalized to the filter’s color range, and hi > 0 in the example. saturate clamps to 0–1.
N
W C E
S
lo = min(C.g, N.g, S.g, E.g, W.g)
hi = max(C.g, N.g, S.g, E.g, W.g)
amp = sqrt(saturate(min(lo, 1 - hi) / hi))
w = amp × peak
outRGB = 128 × saturate((C + w × (N + S + E + W)) / (1 + 4w))
min(lo, 1 – hi) takes the smaller of the dark-side and bright-side headroom terms. Dividing by the neighborhood maximum gives the input to amp. peak is a negative constant that controls sharpening strength. Each of the four neighbors is weighted by w, and 1+4w normalizes the sum of the filter weights. Darker neighbors make the center brighter. Brighter neighbors make it darker. When all five colors match, the filter preserves the value.
Take the bright side of a strand edge. After normalization, the center is 0.50 and all four cardinal neighbors are 0.35. The saved test value of peak is approximately −0.16949. Substituting those values gives amp of about 0.837 and w of about −0.142, raising the center to about 0.697. The center was already brighter than all four neighbors, and the filter widens that difference. The example illustrates how the weight changes an edge. The readbacks below show the effect on actual strands.
The original CAS_CS uses bit-level approximations for the reciprocal and square root. It reads the FXAA result from t0 and two uint4 values from cbCAS, then restores the original color range and writes to u0. The figures and 4K comparison below use actual shader output.
In another UE test, median local contrast across 185,595 hair-covered pixels was 0.115233 before TAA and 0.109859 afterward. It reached 0.047596 after tone mapping, 0.046361 after FXAA, and 0.098648 after CAS. FXAA smooths color edges in the current frame, while CAS sharpens according to local contrast. These stages use the same UE pixels. The original TAA test above used a different set.


A separate 4K test held the inputs fixed. A standalone D3D12 program ran the original DXIL using the actual FXAA output of this UE experiment and all 32 bytes of constants saved from the original. We compared the 3840×2160 R11G11B10_FLOAT outputs before OCIO, as one packed uint32 per pixel with zero tolerance. The comparison found 0 differences across 8,294,400 packed words.
The result applies to the same FXAA input and constants. When the derived RDC was replayed again, the FXAA input differed from the old archive. Comparisons across separate replays need to start at the FXAA output.
We also read back the outputs of depth of field, Bloom, and motion reconstruction. In the UE region we measured, depth of field and Bloom did not boost fine-strand contrast as much as CAS. In a separate comparable original capture, TAA and the next motion reconstruction pass produced identical whole images. The strands had already softened before motion reconstruction. In another run, we fed the original program fixed inputs and let history accumulate until strand clarity approached that of the current input. To apply these findings to the cuff or cheek, check whether the camera or character moved at capture time and which frame supplied the reprojected history. That gives a basis for separating temporal blending from shading differences.
Results of the Original and UE Comparison
The opening images let us compare the room lighting and character silhouette. In close-up, the cheek band and cuff strands diverge at different stages. The original shadow test confirmed that hair reduces point light on the cheek. The band still looks different in the opening comparison. The cuff lock already projects away from the target before OIT. For strands that are visible, we compare edge contrast at the same pixels before and after TAA and sharpening. The table ties each conclusion to its inputs, readbacks, and test scope.
Image Comparisons and GPU Readbacks
The opening images let us compare framing and lighting. To track a displaced edge at the cheek or cuff, we look at the corresponding region in the intermediate outputs. Hair, skin, the floor, and UI all contribute to whole-frame similarity. In Part I, we checked the camera and geometry using values read after saving and reopening the project. Here we trace the cheek samples to the texels written in the Shadow Map and to point-light visibility. At the cuff, we measure the projections of matched segments, then check the Tile queue and garment depth. Mapping the screenshot location to the GPU resource coordinates lets us inspect the inputs at that exact location and find the first pass whose output differs. The table lists the data used in each check.
| Comparison | Data checked | Observed result |
|---|---|---|
| Regular UE viewport | Same-camera viewport image and inputs from that run | The final UE test result is saved, along with a separate comparison using default settings |
| Character, clothing, and camera | Asset paths, mesh positions, camera, and fixed Transform | Visible assets and scene positions were checked. The garment’s supplemental Vertex Stream has a separate binding record |
| Cheek band and direct-light shadows | Shadow-depth writes and point-light visibility in the original test | Strands occluded three skin receivers. The main comparison still differs visually. |
| Position of the lock at the cuff | Same-camera crops, segment projections, cloth depth, and Tile queues | The target lock is still displaced. The offset is already measurable in the segment projection before transparency compositing |
| Fine-strand clarity | Current color, History Color, and post-processing outputs by stage | TAA history blending reduced contrast in the test, and CAS increased local contrast. The opening original preview still lacks its full History Color |
Camera, pose, and readback resolution
The opening panels use the same framing. The original retains the dialogue prompt, and the UE panel shows the regular viewport. With the composition aligned, compare the direction of the lock at the shoulder, the fine strands along the face, and the contrast around the eyes. The cuff offset is traced in segment and depth data. Contrast at the edge of the face is examined in the post-processing comparison.
The earlier stage images show the passes enabled for that run. The test conditions changed between the initialization experiment and the final cuff comparison. Use the pose, camera, and strand configuration saved for the run you are inspecting before tracing its intermediate textures. An output from a different run may describe a different image.
When retesting the cuff, save the camera and pose on both sides and the actual readback resolution. Map the comparison points into one coordinate system before recording strand segments, cloth depth, queue membership, and transparency coverage.
Repeating the test with the same pixels and thresholds
When we repeat a cuff test, an increase in coverage still has to be tied to the original lock. Each run keeps the camera, pose, expression, and background fixed and reads intermediate textures from the current viewport. For the silhouette we read opaque depth. At the cheek we compare material output, direct-light shadows, and ambient light separately. For missing cuff strands we keep the same segment index and check projection, tile queue membership, and transparency coverage. If the test changes garment depth, sampling phase, or history input, we save both settings with the same camera and sampling conditions. Reading the same location across stages tells us whether the change was already there before OIT or appeared during post-processing.
Repeated tests use the same preselected target pixels, with nearby areas expected to remain unaffected serving as controls. Samples added to investigate an anomaly are recorded separately. That preserves the ability to tell whether the target lock has returned to the same location even when total coverage rises. For a stage comparison, we read the same segment endpoints or sample region at both checkpoints and cross-check against an independent record. If fragment update order causes coverage to fluctuate, the report keeps both the stable results and the observed variation, along with the input resources, coordinate system, and sampling window.
When retesting TAA, record the current frame, History Color, sampling offset, and reprojection conditions. After reopening the same view, wait for History Color to reach the sampling conditions defined for the test before comparing the images.
What Fixed-Input Reruns and Viewport Captures Verify
To compare shader outputs, we save the textures and constants read by one execution, including the texture formats and dimensions. The original and UE each run once on those inputs, and we compare the GPU readbacks. To measure the effect of one input, we substitute only History Color or garment depth at the same binding and keep the other inputs fixed. The CAS test uses the same FXAA output and constants on both sides, then compares the packed words in the readbacks.
We also check the regular viewport. The camera, meshes, and upstream textures bound to the target pass show which resources were used that frame. The next check is whether the downstream pass read the output just written. That trace distinguishes data generated in the current UE frame from data taken from the original capture or supplied by a test configuration. For instance, to verify the FXAA input in a particular frame, we match the tone-mapping output to the resource FXAA actually bound.
For Indirect Dispatch or multiple GPU Queues, find the Pass that writes the indirect arguments, then check Resource Barriers and submission dependencies. Two implementations can use the same Shader but bind different constants, Views, or resource versions. RenderDoc Event IDs help locate the calls. Consecutive Event IDs alone cannot establish execution order across queues. When one queue writes a Buffer and another consumes it, check where the write, synchronization, and read occur. That shows which passes the regular viewport executed and whether a read saw the initial value, a previous result, or the current write.
The opening preview from the original lacks a complete History Color. We used a separate replayable capture to check direct-light occlusion, five-layer OIT, and TAA history blending. That capture shows how the passes ran, and its measurements apply to its own pose, camera, and resources. In the two UE viewport tests we could keep the camera and model fixed, vary strand input or one depth condition, and compare the data before and after transparency. We log the reference source, pose, and stage for each readback. The record shows which measurements explain a mechanism and which compare the images in the opening figure. If that reference frame’s inputs become replayable, the same checkpoints can be used to verify it.
In the CAS comparison, the original shader and UE implementation use the same FXAA output and constants. Their 4K outputs match at every pixel with those fixed inputs. The GPU resource bindings show how the UE viewport passes exchange textures. CAS reads the texture written by FXAA, and OCIO reads the CAS output.
A fixed-input comparison also needs to specify where in the frame each readback was taken. For CAS, the input is the texture after FXAA writes it. We read the output after CAS writes it and before OCIO reads it. The final viewport color already includes the display transform. Record both implementations’ Resource Views, pixel formats, and readback points together so the same bindings and sample locations can be used to reproduce the comparison.
Full-screen readback cost and platform coverage
At runtime, the hair passes need dense-strand data, Tile queues, and transparency layers. TAA also retains color history across frames. After pausing or reopening the viewport, the first frame can be hard to reproduce if resources were not rebuilt for the active View.
During an all-stage readback, we tried to copy several full-screen textures and hit a debug-resource allocation failure. The copies use bandwidth and temporary GPU memory, and the cost increases with the size of the region. The custom compute passes also need the appropriate version of Scene Depth, shadows, or post-processing inputs at the right stage. RDG manages transient textures within the current render graph, while textures used across frames are retained separately.
We then let the regular UE viewport finish a frame from the same fixed camera and copied only the area around the cuff. The samples still use coordinates in the original scene textures, so we could check the same target pixels. All runs discussed here used Windows D3D12. On another platform, check the target RHI’s texture formats, atomic operations, and shader branches before repeating the tests with the same inputs. Viewport performance, image quality, and feature coverage also need measurements on the target platform.
Back at the cuff in the opening image, the diagonal lock already projects to the side before transparency runs. TAA and CAS affect the contrast of fine strands that reach the image. To find why this lock missed the target pixel on the cuff, read the endpoints that were actually submitted, then check cloth depth, the Tile queue, and transparency coverage at that same pixel.
Measurement Records and Figure Sources
- The series figure index gives the sources of the original previews, UE viewport captures, and diagnostic outputs.
- The series review notes give the validation scope for the point-light, strand transparency, and cuff experiments.
- Part I documents the fixed asset baseline and coordinate checks.
How AI Was Used
We first noticed a missing stretch of visible hair in the cuff screenshot. From the image alone, it was hard to tell whether the diagonal lock was offset or had lost contrast during compositing and post-processing. AI helped organize the stage images, depth readbacks, and tile queues. Once we paired the original and UE segments, we could compare the lock’s projection directly in the same frame coordinates, then inspect transparency coverage and sharpening at that location.
One early comparison used a capture with a matched camera and a different character pose. We also took a local increase in total cuff coverage as evidence that the target diagonal lock had aligned. We later fixed the pose, camera, and sample points and used the different-pose replay to examine individual passes. Repeating the checks with matching segment indices and native pixel coordinates showed that total coverage rose across parts of the middle cuff. The target lock’s projection still differed from the original.
This article follows the current frame’s strand data through the rendering pipeline, from vertex data to the composited result. The simulation article will cover how those vertices are updated as the character moves.