diff --git a/Sources/iron/RenderPath.hx b/Sources/iron/RenderPath.hx index 05167a8f..adee8214 100644 --- a/Sources/iron/RenderPath.hx +++ b/Sources/iron/RenderPath.hx @@ -83,6 +83,8 @@ class RenderPath { return 64; #elseif (rp_voxelgi_resolution == 32) return 32; + #elseif (rp_voxelgi_resolution == 16) + return 16; #else return 0; #end @@ -689,15 +691,17 @@ class RenderPath { // Image only var img = Image.create3D(width, height, depth, t.format != null ? getTextureFormat(t.format) : TextureFormat.RGBA32); - if (t.mipmaps) img.generateMipmaps(1000); // Allocate mipmaps - return img; + if (t.mipmaps) + img.generateMipmaps(1000); // Allocate mipmaps + return img; } else { // 2D texture if (t.is_image != null && t.is_image) { // Image var img = Image.create(width, height, t.format != null ? getTextureFormat(t.format) : TextureFormat.RGBA32); - if (t.mipmaps) img.generateMipmaps(1000); // Allocate mipmaps - return img; + if (t.mipmaps) + img.generateMipmaps(1000); // Allocate mipmaps + return img; } else { // Render target return Image.createRenderTarget(width, height, diff --git a/Sources/iron/object/LightObject.hx b/Sources/iron/object/LightObject.hx index b9c3a8b1..10866bc1 100644 --- a/Sources/iron/object/LightObject.hx +++ b/Sources/iron/object/LightObject.hx @@ -18,7 +18,7 @@ class LightObject extends Object { public var lightInAtlas = false; public var culledLight = false; public static var pointLightsData: kha.arrays.Float32Array = null; - public var shadowMapScale = 0.0; + public var shadowMapScale = 1.0; // When in forward if this defaults to 0.0, the atlas are not drawn before being bound. // Data used in uniforms public var tileOffsetX: Array = [0.0]; public var tileOffsetY: Array = [0.0]; diff --git a/Sources/iron/object/Uniforms.hx b/Sources/iron/object/Uniforms.hx index d59c77f1..26349699 100644 --- a/Sources/iron/object/Uniforms.hx +++ b/Sources/iron/object/Uniforms.hx @@ -181,11 +181,11 @@ class Uniforms { // Multiple voxel volumes, always set params g.setImageTexture(context.textureUnits[j], rt.image); // image2D/3D if (rt.raw.name.startsWith("voxels_")) { - g.setTextureParameters(context.textureUnits[j], TextureAddressing.Clamp, TextureAddressing.Clamp, TextureFilter.LinearFilter, TextureFilter.LinearFilter, MipMapFilter.LinearMipFilter); + g.setTextureParameters(context.textureUnits[j], TextureAddressing.Clamp, TextureAddressing.Clamp, TextureFilter.LinearFilter, TextureFilter.LinearFilter, MipMapFilter.NoMipFilter); } else if (rt.raw.name.startsWith("voxels")) { - g.setTexture3DParameters(context.textureUnits[j], TextureAddressing.Clamp, TextureAddressing.Clamp, TextureAddressing.Clamp, TextureFilter.LinearFilter, TextureFilter.LinearFilter, MipMapFilter.LinearMipFilter); + g.setTexture3DParameters(context.textureUnits[j], TextureAddressing.Clamp, TextureAddressing.Clamp, TextureAddressing.Clamp, TextureFilter.LinearFilter, TextureFilter.LinearFilter, MipMapFilter.NoMipFilter); } else {