From 83da34d6ac0ca7c9ff169fecf96c4c4a109aa1e2 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Thu, 7 Oct 2021 18:23:57 +0200 Subject: [PATCH] ray:: no portal_connections if not needed --- raycaster.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/raycaster.cpp b/raycaster.cpp index 3015db59..d59cac7a 100644 --- a/raycaster.cpp +++ b/raycaster.cpp @@ -2248,7 +2248,8 @@ struct raycast_map { bind_array(connections, o->tConnections, txConnections, 3, length); bind_array(texturemap, o->tTextureMap, txTextureMap, 5, length); if(volumetric::on) bind_array(volumetric, o->tVolumetric, txVolumetric, 6, length); - bind_array(portal_connections, o->tPortalConnections, txPortalConnections, 1, length); + if(o->tPortalConnections != -1) + bind_array(portal_connections, o->tPortalConnections, txPortalConnections, 1, length); if(o->uMirrorShift != -1) { glUniform1i(o->uMirrorShift, mirror_shift);