forked from LeenkxTeam/LNXSDK
Update leenkx/Sources/leenkx/renderpath/Inc.hx
This commit is contained in:
@ -34,7 +34,6 @@ class Inc {
|
|||||||
#if (rp_voxels == "Voxel GI")
|
#if (rp_voxels == "Voxel GI")
|
||||||
static var voxel_td1:kha.compute.TextureUnit;
|
static var voxel_td1:kha.compute.TextureUnit;
|
||||||
static var voxel_te1:kha.compute.TextureUnit;
|
static var voxel_te1:kha.compute.TextureUnit;
|
||||||
static var voxel_cc1:kha.compute.ConstantLocation;
|
|
||||||
#else
|
#else
|
||||||
#if lnx_voxelgi_shadows
|
#if lnx_voxelgi_shadows
|
||||||
static var voxel_te1:kha.compute.TextureUnit;
|
static var voxel_te1:kha.compute.TextureUnit;
|
||||||
@ -678,7 +677,7 @@ class Inc {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (t.name == "voxelsSDF" || t.name == "voxelsSDFtmp") {
|
if (t.name == "voxelsSDF" || t.name == "voxelsSDFtmp") {
|
||||||
t.format = "R16";
|
t.format = "R8";
|
||||||
t.width = res;
|
t.width = res;
|
||||||
t.height = res * Main.voxelgiClipmapCount;
|
t.height = res * Main.voxelgiClipmapCount;
|
||||||
t.depth = res;
|
t.depth = res;
|
||||||
@ -687,7 +686,7 @@ class Inc {
|
|||||||
#if (rp_voxels == "Voxel AO")
|
#if (rp_voxels == "Voxel AO")
|
||||||
{
|
{
|
||||||
if (t.name == "voxelsOut" || t.name == "voxelsOutB") {
|
if (t.name == "voxelsOut" || t.name == "voxelsOutB") {
|
||||||
t.format = "R16";
|
t.format = "R8";
|
||||||
t.width = res * (6 + 16);
|
t.width = res * (6 + 16);
|
||||||
t.height = res * Main.voxelgiClipmapCount;
|
t.height = res * Main.voxelgiClipmapCount;
|
||||||
t.depth = res;
|
t.depth = res;
|
||||||
@ -819,12 +818,10 @@ class Inc {
|
|||||||
|
|
||||||
voxel_ca1 = voxel_sh1.getConstantLocation("clipmaps");
|
voxel_ca1 = voxel_sh1.getConstantLocation("clipmaps");
|
||||||
voxel_cb1 = voxel_sh1.getConstantLocation("clipmapLevel");
|
voxel_cb1 = voxel_sh1.getConstantLocation("clipmapLevel");
|
||||||
voxel_cc1 = voxel_sh1.getConstantLocation("envmapStrength");
|
|
||||||
|
|
||||||
#if (rp_voxels == "Voxel GI")
|
#if (rp_voxels == "Voxel GI")
|
||||||
voxel_td1 = voxel_sh1.getTextureUnit("voxelsSampler");
|
voxel_td1 = voxel_sh1.getTextureUnit("voxelsSampler");
|
||||||
voxel_te1 = voxel_sh1.getTextureUnit("SDF");
|
voxel_te1 = voxel_sh1.getTextureUnit("SDF");
|
||||||
voxel_cc1 = voxel_sh1.getConstantLocation("envmapStrength");
|
|
||||||
#else
|
#else
|
||||||
#if lnx_voxelgi_shadows
|
#if lnx_voxelgi_shadows
|
||||||
voxel_te1 = voxel_sh1.getTextureUnit("SDF");
|
voxel_te1 = voxel_sh1.getTextureUnit("SDF");
|
||||||
@ -946,7 +943,6 @@ class Inc {
|
|||||||
#if (rp_voxels == "Voxel GI")
|
#if (rp_voxels == "Voxel GI")
|
||||||
kha.compute.Compute.setSampledTexture(voxel_td1, rts.get("voxelsOutB").image);
|
kha.compute.Compute.setSampledTexture(voxel_td1, rts.get("voxelsOutB").image);
|
||||||
kha.compute.Compute.setTexture(voxel_te1, rts.get("voxelsSDF").image, kha.compute.Access.Write);
|
kha.compute.Compute.setTexture(voxel_te1, rts.get("voxelsSDF").image, kha.compute.Access.Write);
|
||||||
kha.compute.Compute.setFloat(voxel_cc1, iron.Scene.active.world == null ? 0.0 : iron.Scene.active.world.probe.raw.strength);
|
|
||||||
#else
|
#else
|
||||||
#if lnx_voxelgi_shadows
|
#if lnx_voxelgi_shadows
|
||||||
kha.compute.Compute.setTexture(voxel_te1, rts.get("voxelsSDF").image, kha.compute.Access.Write);
|
kha.compute.Compute.setTexture(voxel_te1, rts.get("voxelsSDF").image, kha.compute.Access.Write);
|
||||||
@ -971,8 +967,6 @@ class Inc {
|
|||||||
|
|
||||||
kha.compute.Compute.setInt(voxel_cb1, iron.RenderPath.clipmapLevel);
|
kha.compute.Compute.setInt(voxel_cb1, iron.RenderPath.clipmapLevel);
|
||||||
|
|
||||||
kha.compute.Compute.setFloat(voxel_cc1, iron.Scene.active.world == null ? 0.0 : iron.Scene.active.world.probe.raw.strength);
|
|
||||||
|
|
||||||
kha.compute.Compute.compute(Std.int(res / 8), Std.int(res / 8), Std.int(res / 8));
|
kha.compute.Compute.compute(Std.int(res / 8), Std.int(res / 8), Std.int(res / 8));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user