forked from LeenkxTeam/LNXSDK
Update leenkx/Sources/leenkx/renderpath/Inc.hx
This commit is contained in:
parent
6a25b3c5d7
commit
001be2f8da
@ -77,6 +77,9 @@ class Inc {
|
||||
#if (rp_voxels == "Voxel GI")
|
||||
static var voxel_sh5:kha.compute.Shader = null;
|
||||
static var voxel_ta5:kha.compute.TextureUnit;
|
||||
static var voxel_te5:kha.compute.TextureUnit;
|
||||
static var voxel_tf5:kha.compute.TextureUnit;
|
||||
static var voxel_tg5:kha.compute.TextureUnit;
|
||||
static var voxel_ca5:kha.compute.ConstantLocation;
|
||||
static var voxel_cb5:kha.compute.ConstantLocation;
|
||||
static var voxel_cc5:kha.compute.ConstantLocation;
|
||||
@ -677,7 +680,7 @@ class Inc {
|
||||
}
|
||||
else {
|
||||
if (t.name == "voxelsSDF" || t.name == "voxelsSDFtmp") {
|
||||
t.format = "R16";
|
||||
t.format = "R8";
|
||||
t.width = res;
|
||||
t.height = res * Main.voxelgiClipmapCount;
|
||||
t.depth = res;
|
||||
@ -686,7 +689,7 @@ class Inc {
|
||||
#if (rp_voxels == "Voxel AO")
|
||||
{
|
||||
if (t.name == "voxelsOut" || t.name == "voxelsOutB") {
|
||||
t.format = "R16";
|
||||
t.format = "R8";
|
||||
t.width = res * (6 + 16);
|
||||
t.height = res * Main.voxelgiClipmapCount;
|
||||
t.depth = res;
|
||||
@ -892,7 +895,9 @@ class Inc {
|
||||
{
|
||||
voxel_sh5 = path.getComputeShader("voxel_light");
|
||||
voxel_ta5 = voxel_sh5.getTextureUnit("voxelsLight");
|
||||
|
||||
voxel_te5 = voxel_sh5.getTextureUnit("voxels");
|
||||
voxel_tf5 = voxel_sh5.getTextureUnit("voxelsSampler");
|
||||
voxel_tg5 = voxel_sh5.getTextureUnit("voxelsSDFSampler");
|
||||
voxel_ca5 = voxel_sh5.getConstantLocation("clipmaps");
|
||||
voxel_cb5 = voxel_sh5.getConstantLocation("clipmapLevel");
|
||||
|
||||
@ -1213,7 +1218,7 @@ class Inc {
|
||||
kha.compute.Compute.setSampledTexture(voxel_td4, rts.get("voxelsSDF").image);
|
||||
kha.compute.Compute.setTexture(voxel_te4, rts.get("voxels_specular").image, kha.compute.Access.Write);
|
||||
|
||||
//kha.compute.Compute.setSampledTexture(voxel_tf4, rts.get("gbuffer2").image);
|
||||
kha.compute.Compute.setSampledTexture(voxel_tf4, rts.get("gbuffer2").image);
|
||||
|
||||
var fa:Float32Array = new Float32Array(Main.voxelgiClipmapCount * 10);
|
||||
for (i in 0...Main.voxelgiClipmapCount) {
|
||||
@ -1288,7 +1293,9 @@ 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);
|
||||
kha.compute.Compute.setSampledTexture(voxel_tf5, rts.get("voxelsOut").image);
|
||||
kha.compute.Compute.setSampledTexture(voxel_tg5, rts.get("voxelsSDF").image);
|
||||
var fa:Float32Array = new Float32Array(Main.voxelgiClipmapCount * 10);
|
||||
for (i in 0...Main.voxelgiClipmapCount) {
|
||||
fa[i * 10] = clipmaps[i].voxelSize;
|
||||
|
Loading…
x
Reference in New Issue
Block a user