Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Create a separate NodeTree for the scope
We do this because the base hud node tree is limited to only write 0.02 or less into the zbuffer
  • Loading branch information
Redotix committed Jun 25, 2024
commit acfae047d5c052bcf9406cacc1c50f367b0928cf
2 changes: 1 addition & 1 deletion src/Layers/xrRender/r__dsgraph_build.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ void R_dsgraph_structure::r_dsgraph_insert_dynamic(dxRender_Visual* pVisual, Fve
// Redotix99: for 3D Shader Based Scopes
if (sh->flags.isScope2)
{
mapHUD_Node* N = mapHUD.insertInAnyWay(FLT_MAX);
mapHUD_Node* N = mapScopeHUD.insertInAnyWay(FLT_MAX);
N->val.ssa = SSA;
N->val.pObject = RI.val_pObject;
N->val.pVisual = pVisual;
Expand Down
3 changes: 3 additions & 0 deletions src/Layers/xrRender/r__dsgraph_render.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -547,6 +547,9 @@ void R_dsgraph_structure::r_dsgraph_render_hud(bool NoPS)

rmNormal();

mapScopeHUD.traverseLR(sorted_L1);
mapScopeHUD.clear();

// Restore projection
Device.mProject = Pold;
Device.mFullTransform = FTold;
Expand Down
1 change: 1 addition & 0 deletions src/Layers/xrRender/r__dsgraph_structure.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ class R_dsgraph_structure : public IRender_interface, public pureFrame
R_dsgraph::mapMatrixPasses_T mapMatrixPasses [2];
R_dsgraph::mapSorted_T mapSorted;
R_dsgraph::mapHUD_T mapHUD;
R_dsgraph::mapScopeHUD_T mapScopeHUD;
R_dsgraph::mapLOD_T mapLOD;
R_dsgraph::mapSorted_T mapDistort;
R_dsgraph::mapHUD_T mapHUDSorted;
Expand Down
3 changes: 3 additions & 0 deletions src/Layers/xrRender/r__dsgraph_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,9 @@ namespace R_dsgraph
typedef FixedMAP<float, _MatrixItemS, render_allocator> mapHUD_T;
typedef mapHUD_T::TNode mapHUD_Node;

typedef FixedMAP<float, _MatrixItemS, render_allocator> mapScopeHUD_T;
typedef mapScopeHUD_T::TNode mapScopeHUD_T_Node;

typedef FixedMAP<float, _MatrixItemS, render_allocator> HUDMask_T;
typedef HUDMask_T::TNode HUDMask_Node;

Expand Down