From 847d0c401112b8c3f31442c2230916a74d6bba6f Mon Sep 17 00:00:00 2001 From: e2002e Date: Tue, 26 Mar 2024 14:39:24 +0100 Subject: [PATCH] reinit voxel's resolve image in case resize() is called. --- Sources/iron/RenderPath.hx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Sources/iron/RenderPath.hx b/Sources/iron/RenderPath.hx index 3d158d02..7f63a1d8 100644 --- a/Sources/iron/RenderPath.hx +++ b/Sources/iron/RenderPath.hx @@ -567,7 +567,7 @@ class RenderPath { } } - // Resize textures FIXME: this doesn't seam to resize 2D images (not renderTargets) + // Resize textures FIXME: this doesn't seem to resize 2D images for (rt in renderTargets) { if (rt != null && rt.raw.width == 0) { App.notifyOnInit(rt.image.unload); @@ -581,6 +581,16 @@ class RenderPath { rt.image.setDepthStencilFrom(depthToRenderTarget.get(rt.depthStencilFrom).image); } } + + #if (rp_voxels != "Off") + #if (rp_voxels == "Voxel GI") + armory.renderpath.Inc.initGI("voxels_diffuse"); + armory.renderpath.Inc.initGI("voxels_specular"); + #else + armory.renderpath.Inc.initGI("voxels_ao"); + #end + armory.renderpath.RenderPathCreator.res_pre_clear = true; + #end } public function createRenderTarget(t: RenderTargetRaw): RenderTarget {