From 4b4af347a02df00a7731582eb7d1e273928eda44 Mon Sep 17 00:00:00 2001 From: Human Gamer <39096122+HumanGamer@users.noreply.github.com> Date: Sun, 23 May 2021 22:23:26 -0500 Subject: [PATCH] Fixed crash with translucent materials --- engine/renderInstance/renderElemMgr.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/renderInstance/renderElemMgr.h b/engine/renderInstance/renderElemMgr.h index 1e35873a..7cdd5545 100644 --- a/engine/renderInstance/renderElemMgr.h +++ b/engine/renderInstance/renderElemMgr.h @@ -50,7 +50,7 @@ inline bool RenderElemMgr::newPassNeeded(MatInstance* currMatInst, RenderInst* r // 1. There's no Material Instance (old ff object?) // 2. If the material differ // 3. If the material instance types are different. - return ((ri->matInst == NULL) || (ri->matInst->getMaterial() != currMatInst->getMaterial()) || (currMatInst->compare(ri->matInst) != 0)); + return ((ri->matInst == NULL) || (ri->matInst != currMatInst) || (currMatInst->compare(ri->matInst) != 0)); }