Skip to content

Commit

Permalink
Fix wallmark render
Browse files Browse the repository at this point in the history
  • Loading branch information
Drombeys committed Dec 11, 2024
1 parent 4a9c7ba commit 588b484
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions src/Layers/xrRender/Blender_Screen_SET.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -247,9 +247,19 @@ void CBlender_Screen_SET::Compile (CBlender_Compile& C)

C.StageBegin ();
C.StageSET_Address (oClamp.value?D3DTADDRESS_CLAMP:D3DTADDRESS_WRAP);
C.StageSET_Color (D3DTA_TEXTURE, D3DTOP_BLENDDIFFUSEALPHA, D3DTA_DIFFUSE);
C.StageSET_Alpha (D3DTA_TEXTURE, D3DTOP_MODULATE, D3DTA_DIFFUSE);
C.Stage_Texture (oT_Name);

// This code fixes the rendering of wallmarks in editors,
// but breaks dynamic wallmarks in the game, so here ifdef
#ifdef _EDITOR
C.StageSET_Color(D3DTA_TEXTURE, D3DTOP_BLENDDIFFUSEALPHA, D3DTA_DIFFUSE);
C.StageSET_Alpha(D3DTA_TEXTURE, D3DTOP_MODULATE, D3DTA_DIFFUSE);
C.Stage_Texture(oT_Name);
#else
C.StageSET_Color(D3DTA_DIFFUSE, D3DTOP_BLENDDIFFUSEALPHA, D3DTA_CURRENT);
C.StageSET_Alpha(D3DTA_DIFFUSE, D3DTOP_MODULATE, D3DTA_CURRENT);
C.Stage_Texture("$null");
#endif

C.Stage_Matrix ("$null", 0);
C.Stage_Constant ("$null");
C.StageEnd ();
Expand Down

0 comments on commit 588b484

Please sign in to comment.