From ae257b952de75f72537d6aee4d01b0b65b0dc48c Mon Sep 17 00:00:00 2001 From: ? Date: Fri, 22 Feb 2019 21:27:42 +0100 Subject: [PATCH] shadows are now drawn or not correctly -- depending on model_needs_depth() --- graph.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/graph.cpp b/graph.cpp index 8d5123cc..9172a23a 100644 --- a/graph.cpp +++ b/graph.cpp @@ -510,7 +510,7 @@ bool noshadow; #if CAP_SHAPES void ShadowV(const transmatrix& V, const hpcshape& bp, PPR prio) { if(mmspatial) { - if(pmodel == mdHyperboloid || pmodel == mdBall || pmodel == mdHemisphere || noshadow) + if(model_needs_depth() || noshadow) return; // shadows break the depth testing dynamicval p(poly_outline, OUTLINE_TRANS); queuepolyat(V, bp, SHADOW_MON, prio); @@ -3338,7 +3338,7 @@ int wavephase; #if CAP_SHAPES void floorShadow(cell *c, const transmatrix& V, color_t col) { - if(pmodel == mdHyperboloid || pmodel == mdBall || pmodel == mdHemisphere || noshadow) + if(model_needs_depth() || noshadow) return; // shadows break the depth testing dynamicval p(poly_outline, OUTLINE_TRANS); if(qfi.shape) {