From a7671cf754483adc7b814247eb839f72e9c85065 Mon Sep 17 00:00:00 2001 From: Alex Lo Date: Sun, 12 Nov 2023 11:32:41 +0000 Subject: [PATCH] Fix r_drawtris Depth test should be disabled when rendering wireframes so we can see the triangles being drawn behind the front-most surfaces. --- codemp/rd-rend2/tr_shade.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codemp/rd-rend2/tr_shade.cpp b/codemp/rd-rend2/tr_shade.cpp index bc65a71cb7..782375b5ac 100644 --- a/codemp/rd-rend2/tr_shade.cpp +++ b/codemp/rd-rend2/tr_shade.cpp @@ -897,7 +897,7 @@ static void DrawTris(shaderCommands_t *input, const VertexArraysProperties *vert uniformDataWriter.SetUniformVec4(UNIFORM_VERTCOLOR, vertColor); DrawItem item = {}; - item.renderState.stateBits = GLS_POLYMODE_LINE | GLS_DEPTHMASK_TRUE | GLS_POLYGON_OFFSET_FILL; + item.renderState.stateBits = GLS_POLYMODE_LINE | GLS_DEPTHMASK_TRUE | GLS_POLYGON_OFFSET_FILL | GLS_DEPTHTEST_DISABLE; item.renderState.cullType = RB_GetCullType(&backEnd.viewParms, backEnd.currentEntity, input->shader->cullType); item.renderState.depthRange = RB_GetDepthRange(backEnd.currentEntity, input->shader); item.program = sp;