diff --git a/Sources/iron/RenderPath.hx b/Sources/iron/RenderPath.hx index 05167a8f..abdbde48 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(1); // 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(16); // 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..bbd4d7f3 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, we drawMeshes() which will set this only after drawing shadowmap. This locks the drawing of the atlases so it's better to initialize it at 1.0 // Data used in uniforms public var tileOffsetX: Array = [0.0]; public var tileOffsetY: Array = [0.0];