From dc82c19901819ffb239f13c3e7e9e7f1d3d04b54 Mon Sep 17 00:00:00 2001 From: Magnus Norddahl Date: Thu, 8 Dec 2016 10:35:51 +0100 Subject: [PATCH] Fix sprites/translucent stuff being occluded by portal walls --- src/r_poly_scene.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/r_poly_scene.cpp b/src/r_poly_scene.cpp index ef2ef5f1b..3b03507f1 100644 --- a/src/r_poly_scene.cpp +++ b/src/r_poly_scene.cpp @@ -274,7 +274,7 @@ void RenderPolyScene::RenderTranslucent(int portalDepth) args.objectToClip = &WorldToClip; args.mode = TriangleDrawMode::Fan; args.stenciltestvalue = portal->StencilValue + 1; - args.stencilwritevalue = StencilValue; + args.stencilwritevalue = StencilValue + 1; args.SetClipPlane(PortalPlane.x, PortalPlane.y, PortalPlane.z, PortalPlane.w); for (const auto &verts : portal->Shape) { @@ -295,7 +295,7 @@ void RenderPolyScene::RenderTranslucent(int portalDepth) args.objectToClip = &WorldToClip; args.mode = TriangleDrawMode::Fan; args.stenciltestvalue = portal->StencilValue + 1; - args.stencilwritevalue = StencilValue; + args.stencilwritevalue = StencilValue + 1; args.SetClipPlane(PortalPlane.x, PortalPlane.y, PortalPlane.z, PortalPlane.w); for (const auto &verts : portal->Shape) {