From baf84168294f61c5eb4e912d49b51257b1049aa5 Mon Sep 17 00:00:00 2001 From: yvain Date: Sat, 27 Jul 2024 07:14:04 +0200 Subject: [PATCH] finished implement voxels shadows. --- Sources/armory/renderpath/Inc.hx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Sources/armory/renderpath/Inc.hx b/Sources/armory/renderpath/Inc.hx index ad232ee81..31c759d85 100644 --- a/Sources/armory/renderpath/Inc.hx +++ b/Sources/armory/renderpath/Inc.hx @@ -125,7 +125,6 @@ class Inc { #end #if (rp_voxels == "Voxel GI") static var voxel_sh5:kha.compute.Shader = null; - static var voxel_te5:kha.compute.TextureUnit; static var voxel_ta5:kha.compute.TextureUnit; static var voxel_ca5:kha.compute.ConstantLocation; static var voxel_cb5:kha.compute.ConstantLocation; @@ -645,7 +644,7 @@ class Inc { } else if (t.name == "voxelsLight") { t.format = "R32"; - t.width = res * 6; + t.width = res; t.height = res; t.depth = res * 3; } @@ -881,7 +880,6 @@ class Inc { { voxel_sh5 = path.getComputeShader("voxel_light"); voxel_ta5 = voxel_sh5.getTextureUnit("voxelsLight"); - voxel_te5 = voxel_sh5.getTextureUnit("voxels"); voxel_ca5 = voxel_sh5.getConstantLocation("clipmaps"); voxel_cb5 = voxel_sh5.getConstantLocation("clipmapLevel"); @@ -1483,7 +1481,6 @@ class Inc { kha.compute.Compute.setShader(voxel_sh5); kha.compute.Compute.setTexture(voxel_ta5, rts.get("voxelsLight").image, kha.compute.Access.Write); - kha.compute.Compute.setTexture(voxel_te5, rts.get("voxels").image, kha.compute.Access.Read); var fa:Float32Array = new Float32Array(Main.voxelgiClipmapCount * 10); for (i in 0...Main.voxelgiClipmapCount) {