From 2022fa97ccc1f70bd3fe8726b0ed3d4c505d0c2a Mon Sep 17 00:00:00 2001 From: Nick Fisher Date: Tue, 1 Jul 2025 10:28:36 +0800 Subject: [PATCH] use DEPTH24_STENCIL8 as depth attachment for render target. I'm not sure this is even used; the backend always allocate its own internal depth/stencil buffer. There may be a final blit from the internal buffer to the render target buffer, but I haven't actually confirmed this yet --- .../filament/src/implementation/ffi_filament_app.dart | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/thermion_dart/lib/src/filament/src/implementation/ffi_filament_app.dart b/thermion_dart/lib/src/filament/src/implementation/ffi_filament_app.dart index b567b82b..d5d18a60 100644 --- a/thermion_dart/lib/src/filament/src/implementation/ffi_filament_app.dart +++ b/thermion_dart/lib/src/filament/src/implementation/ffi_filament_app.dart @@ -255,9 +255,9 @@ class FFIFilamentApp extends FilamentApp { _onDestroy.clear(); } - /// If [asset] is actually an instance (i.e. was created via createInstance), - /// its resources may not actually be destroyed until the parent asset is - /// destroyed. It may be marked as unused, and recycled the next time + /// If [asset] is actually an instance (i.e. was created via createInstance), + /// its resources may not actually be destroyed until the parent asset is + /// destroyed. It may be marked as unused, and recycled the next time /// createInstance is called. /// /// @@ -295,9 +295,10 @@ class FFIFilamentApp extends FilamentApp { depth = await createTexture(width, height, flags: { TextureUsage.TEXTURE_USAGE_SAMPLEABLE, - TextureUsage.TEXTURE_USAGE_DEPTH_ATTACHMENT + TextureUsage.TEXTURE_USAGE_DEPTH_ATTACHMENT, + TextureUsage.TEXTURE_USAGE_BLIT_SRC, }, - textureFormat: TextureFormat.DEPTH32F) as FFITexture; + textureFormat: TextureFormat.DEPTH24_STENCIL8) as FFITexture; } final renderTarget = await withPointerCallback((cb) { RenderTarget_createRenderThread(