From 3e04bf427fcacf7ce25417f3ec097e1db21761f6 Mon Sep 17 00:00:00 2001 From: Nick Fisher Date: Tue, 17 Jun 2025 14:13:19 +0800 Subject: [PATCH] allow passing reflection texture separately from irradiance when calling loadIblFromTexture --- .../lib/src/viewer/src/ffi/src/thermion_viewer_ffi.dart | 4 ++-- thermion_dart/lib/src/viewer/src/thermion_viewer_base.dart | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/thermion_dart/lib/src/viewer/src/ffi/src/thermion_viewer_ffi.dart b/thermion_dart/lib/src/viewer/src/ffi/src/thermion_viewer_ffi.dart index 8e6eccec..147b2e8e 100644 --- a/thermion_dart/lib/src/viewer/src/ffi/src/thermion_viewer_ffi.dart +++ b/thermion_dart/lib/src/viewer/src/ffi/src/thermion_viewer_ffi.dart @@ -330,11 +330,11 @@ class ThermionViewerFFI extends ThermionViewer { /// /// /// - Future loadIblFromTexture(Texture texture, { double intensity = 30000, bool destroyExisting = true}) async { + Future loadIblFromTexture(Texture texture, { Texture? reflectionsTexture = null, double intensity = 30000, bool destroyExisting = true}) async { await removeIbl(destroy: destroyExisting); final ibl = await FFIIndirectLight.fromIrradianceTexture(texture, - reflectionsTexture: texture, intensity: intensity); + reflectionsTexture: reflectionsTexture, intensity: intensity); await scene.setIndirectLight(ibl); } diff --git a/thermion_dart/lib/src/viewer/src/thermion_viewer_base.dart b/thermion_dart/lib/src/viewer/src/thermion_viewer_base.dart index 93898067..51b189cb 100644 --- a/thermion_dart/lib/src/viewer/src/thermion_viewer_base.dart +++ b/thermion_dart/lib/src/viewer/src/thermion_viewer_base.dart @@ -103,7 +103,7 @@ abstract class ThermionViewer { /// /// Future loadIblFromTexture(Texture texture, - {double intensity = 30000, bool destroyExisting = true}); + {Texture? reflectionsTexture, double intensity = 30000, bool destroyExisting = true}); /// /// Rotates the IBL & skybox.