Skip to content

Commit

Permalink
WIP: Fix engine issues with SSS 21, fixed motion vectors
Browse files Browse the repository at this point in the history
  • Loading branch information
yohjimane committed Nov 10, 2024
1 parent 9a2fed8 commit 106d56d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
14 changes: 12 additions & 2 deletions src/Layers/xrRender/r__dsgraph_build.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,12 @@ void R_dsgraph_structure::insert_dynamic(IRenderable* root, dxRender_Visual* pVi

if (!sh->passes[0]->ps->hud_disabled)
{
HUDMask.insert_anyway(distSQ, _MatrixItemSSFX({ SSA, root, pVisual, xform, sh }));
auto hudMaskNode = HUDMask.insert_anyway(distSQ);
hudMaskNode->second.ssa = SSA;
hudMaskNode->second.pObject = root;
hudMaskNode->second.pVisual = pVisual;
hudMaskNode->second.Matrix = xform;
hudMaskNode->second.se = sh;
}

#if RENDER != R_R1
Expand Down Expand Up @@ -202,7 +207,12 @@ void R_dsgraph_structure::insert_static(dxRender_Visual* pVisual)
// Water rendering
if (sh->flags.isWater)
{
mapWater.insert_anyway(distSQ, _MatrixItemSSFX({ SSA, NULL, pVisual, Fidentity, sh }));
auto waterNode = mapWater.insert_anyway(distSQ);
waterNode->second.ssa = SSA;
waterNode->second.pObject = NULL;
waterNode->second.pVisual = pVisual;
waterNode->second.Matrix = Fidentity;
waterNode->second.se = sh;
return;
}

Expand Down
4 changes: 2 additions & 2 deletions src/Layers/xrRender/r__dsgraph_structure.h
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,8 @@ struct R_dsgraph_structure
mapLOD.destroy();
mapDistort.destroy();
mapHUDSorted.destroy();
HUDMask.destroy();
mapWater.destroy();
//HUDMask.destroy();
//mapWater.destroy();

#if RENDER != R_R1
mapWmark.destroy();
Expand Down
2 changes: 1 addition & 1 deletion src/Layers/xrRender/r__dsgraph_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ struct _MatrixItemSSFX
dxRender_Visual* pVisual;
Fmatrix Matrix; // matrix (copy)
ShaderElement* se;
Fmatrix PrevMatrix{};
mutable Fmatrix PrevMatrix{};
};

struct _MatrixItemS
Expand Down

0 comments on commit 106d56d

Please sign in to comment.