allow passing reflection texture separately from irradiance when calling loadIblFromTexture

This commit is contained in:
Nick Fisher
2025-06-17 14:13:19 +08:00
parent 65ca59ff22
commit 3e04bf427f
2 changed files with 3 additions and 3 deletions

View File

@@ -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); await removeIbl(destroy: destroyExisting);
final ibl = await FFIIndirectLight.fromIrradianceTexture(texture, final ibl = await FFIIndirectLight.fromIrradianceTexture(texture,
reflectionsTexture: texture, intensity: intensity); reflectionsTexture: reflectionsTexture, intensity: intensity);
await scene.setIndirectLight(ibl); await scene.setIndirectLight(ibl);
} }

View File

@@ -103,7 +103,7 @@ abstract class ThermionViewer {
/// ///
/// ///
Future loadIblFromTexture(Texture texture, Future loadIblFromTexture(Texture texture,
{double intensity = 30000, bool destroyExisting = true}); {Texture? reflectionsTexture, double intensity = 30000, bool destroyExisting = true});
/// ///
/// Rotates the IBL & skybox. /// Rotates the IBL & skybox.