Skip to content

Commit 2fd80d4

Browse files
committed
WIP: Fix engine issues with SSS 21, fixed motion vectors
1 parent 831334a commit 2fd80d4

File tree

3 files changed

+15
-5
lines changed

3 files changed

+15
-5
lines changed

src/Layers/xrRender/r__dsgraph_build.cpp

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,12 @@ void R_dsgraph_structure::insert_dynamic(IRenderable* root, dxRender_Visual* pVi
8989

9090
if (!sh->passes[0]->ps->hud_disabled)
9191
{
92-
HUDMask.insert_anyway(distSQ, _MatrixItemSSFX({ SSA, root, pVisual, xform, sh }));
92+
auto hudMaskNode = HUDMask.insert_anyway(distSQ);
93+
hudMaskNode->second.ssa = SSA;
94+
hudMaskNode->second.pObject = root;
95+
hudMaskNode->second.pVisual = pVisual;
96+
hudMaskNode->second.Matrix = xform;
97+
hudMaskNode->second.se = sh;
9398
}
9499

95100
#if RENDER != R_R1
@@ -202,7 +207,12 @@ void R_dsgraph_structure::insert_static(dxRender_Visual* pVisual)
202207
// Water rendering
203208
if (sh->flags.isWater)
204209
{
205-
mapWater.insert_anyway(distSQ, _MatrixItemSSFX({ SSA, NULL, pVisual, Fidentity, sh }));
210+
auto waterNode = mapWater.insert_anyway(distSQ);
211+
waterNode->second.ssa = SSA;
212+
waterNode->second.pObject = NULL;
213+
waterNode->second.pVisual = pVisual;
214+
waterNode->second.Matrix = Fidentity;
215+
waterNode->second.se = sh;
206216
return;
207217
}
208218

src/Layers/xrRender/r__dsgraph_structure.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,8 @@ struct R_dsgraph_structure
141141
mapLOD.destroy();
142142
mapDistort.destroy();
143143
mapHUDSorted.destroy();
144-
HUDMask.destroy();
145-
mapWater.destroy();
144+
//HUDMask.destroy();
145+
//mapWater.destroy();
146146

147147
#if RENDER != R_R1
148148
mapWmark.destroy();

src/Layers/xrRender/r__dsgraph_types.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ struct _MatrixItemSSFX
2828
dxRender_Visual* pVisual;
2929
Fmatrix Matrix; // matrix (copy)
3030
ShaderElement* se;
31-
Fmatrix PrevMatrix{};
31+
mutable Fmatrix PrevMatrix{};
3232
};
3333

3434
struct _MatrixItemS

0 commit comments

Comments
 (0)