From f98e732cb5915c9ca8b0d0f445d54a6dc5a3f416 Mon Sep 17 00:00:00 2001 From: luboslenco Date: Mon, 29 Jan 2024 09:49:10 +0100 Subject: [PATCH] Prepare iron to c port --- armorforge/Sources/TabObjects.ts | 10 +++++----- base/Sources/RenderPathRaytrace.ts | 2 +- base/Sources/RenderPathRaytraceBake.ts | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/armorforge/Sources/TabObjects.ts b/armorforge/Sources/TabObjects.ts index 86bf66315..23e475971 100644 --- a/armorforge/Sources/TabObjects.ts +++ b/armorforge/Sources/TabObjects.ts @@ -227,20 +227,20 @@ class TabObjects { Context.raw.selectedObject.transform.dirty = true; if (Context.raw.selectedObject.name == "Scene") { - let p = Scene.active.world.probe; + let p = Scene.active.world; p.raw.strength = ui.slider(Zui.handle("tabobjects_16", {value: p.raw.strength}), "Environment", 0.0, 5.0, true); } else if (Context.raw.selectedObject.constructor == LightObject) { let light = (Context.raw.selectedObject as LightObject); let lightHandle = Zui.handle("tabobjects_17"); - lightHandle.value = light.data.raw.strength / 10; - light.data.raw.strength = ui.slider(lightHandle, "Strength", 0.0, 5.0, true) * 10; + lightHandle.value = light.data.strength / 10; + light.data.strength = ui.slider(lightHandle, "Strength", 0.0, 5.0, true) * 10; } else if (Context.raw.selectedObject.constructor == CameraObject) { let cam = (Context.raw.selectedObject as CameraObject); let fovHandle = Zui.handle("tabobjects_18"); - fovHandle.value = Math.floor(cam.data.raw.fov * 100) / 100; - cam.data.raw.fov = ui.slider(fovHandle, "FoV", 0.3, 2.0, true); + fovHandle.value = Math.floor(cam.data.fov * 100) / 100; + cam.data.fov = ui.slider(fovHandle, "FoV", 0.3, 2.0, true); if (fovHandle.changed) { cam.buildProjection(); } diff --git a/base/Sources/RenderPathRaytrace.ts b/base/Sources/RenderPathRaytrace.ts index 6fff50d6b..1f39d4494 100644 --- a/base/Sources/RenderPathRaytrace.ts +++ b/base/Sources/RenderPathRaytrace.ts @@ -48,7 +48,7 @@ class RenderPathRaytrace { Context.updateEnvmap(); } - let probe = Scene.active.world.probe; + let probe = Scene.active.world; let savedEnvmap = Context.raw.showEnvmapBlur ? probe.radianceMipmaps[0] : Context.raw.savedEnvmap; if (RenderPathRaytrace.lastEnvmap != savedEnvmap) { diff --git a/base/Sources/RenderPathRaytraceBake.ts b/base/Sources/RenderPathRaytraceBake.ts index 140384bd6..1eb929a20 100644 --- a/base/Sources/RenderPathRaytraceBake.ts +++ b/base/Sources/RenderPathRaytraceBake.ts @@ -75,7 +75,7 @@ class RenderPathRaytraceBake { Context.loadEnvmap(); Context.updateEnvmap(); } - let probe = Scene.active.world.probe; + let probe = Scene.active.world; let savedEnvmap = Context.raw.showEnvmapBlur ? probe.radianceMipmaps[0] : Context.raw.savedEnvmap; if (RenderPathRaytrace.lastEnvmap != savedEnvmap || RenderPathRaytraceBake.lastLayer != Context.raw.layer.texpaint) { RenderPathRaytrace.lastEnvmap = savedEnvmap; @@ -101,7 +101,7 @@ class RenderPathRaytraceBake { f32a[1] = Context.raw.bakeAoStrength; f32a[2] = Context.raw.bakeAoRadius; f32a[3] = Context.raw.bakeAoOffset; - f32a[4] = Scene.active.world.probe.raw.strength; + f32a[4] = Scene.active.world.raw.strength; f32a[5] = Context.raw.bakeUpAxis; f32a[6] = Context.raw.envmapAngle;