diff --git a/Sources/iron/RenderPath.hx b/Sources/iron/RenderPath.hx index 0d7df7a4..05167a8f 100644 --- a/Sources/iron/RenderPath.hx +++ b/Sources/iron/RenderPath.hx @@ -689,7 +689,7 @@ class RenderPath { // Image only var img = Image.create3D(width, height, depth, t.format != null ? getTextureFormat(t.format) : TextureFormat.RGBA32); - if (t.mipmaps) img.generateMipmaps(Main.voxelgiClipmapCount); // Allocate mipmaps + if (t.mipmaps) img.generateMipmaps(1000); // Allocate mipmaps return img; } else { // 2D texture diff --git a/Sources/iron/object/Uniforms.hx b/Sources/iron/object/Uniforms.hx index 630f8fd3..d59c77f1 100644 --- a/Sources/iron/object/Uniforms.hx +++ b/Sources/iron/object/Uniforms.hx @@ -183,13 +183,13 @@ class Uniforms { if (rt.raw.name.startsWith("voxels_")) { g.setTextureParameters(context.textureUnits[j], TextureAddressing.Clamp, TextureAddressing.Clamp, TextureFilter.LinearFilter, TextureFilter.LinearFilter, MipMapFilter.LinearMipFilter); } - else if (rt.raw.name.startsWith("voxelsOut")) + else if (rt.raw.name.startsWith("voxels")) { - g.setTexture3DParameters(context.textureUnits[j], TextureAddressing.Clamp, TextureAddressing.Clamp, TextureAddressing.Clamp, TextureFilter.PointFilter, TextureFilter.PointFilter, MipMapFilter.LinearMipFilter); + g.setTexture3DParameters(context.textureUnits[j], TextureAddressing.Clamp, TextureAddressing.Clamp, TextureAddressing.Clamp, TextureFilter.LinearFilter, TextureFilter.LinearFilter, MipMapFilter.LinearMipFilter); } - else if (rt.raw.name.startsWith("voxels")) + else { - g.setTexture3DParameters(context.textureUnits[j], TextureAddressing.Clamp, TextureAddressing.Clamp, TextureAddressing.Clamp, TextureFilter.LinearFilter, TextureFilter.LinearFilter, MipMapFilter.NoMipFilter); + g.setTextureParameters(context.textureUnits[j], TextureAddressing.Clamp, TextureAddressing.Clamp, TextureFilter.LinearFilter, TextureFilter.LinearFilter, MipMapFilter.LinearMipFilter); } paramsSet = true; }