Skip to content

Commit

Permalink
finished implement voxels shadows.
Browse files Browse the repository at this point in the history
  • Loading branch information
e2002e committed Jul 27, 2024
1 parent 3141192 commit baf8416
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions Sources/armory/renderpath/Inc.hx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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");
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit baf8416

Please sign in to comment.