From 5a74345fe1c0bd57cd36444f84f4564c108483a2 Mon Sep 17 00:00:00 2001 From: Nick Fisher Date: Fri, 23 May 2025 16:28:09 +0800 Subject: [PATCH] specify texture flags for render target in flutter --- .../lib/src/thermion_flutter_method_channel_platform.dart | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/thermion_flutter/thermion_flutter_method_channel/lib/src/thermion_flutter_method_channel_platform.dart b/thermion_flutter/thermion_flutter_method_channel/lib/src/thermion_flutter_method_channel_platform.dart index 6f895fb2..7a12fd13 100644 --- a/thermion_flutter/thermion_flutter_method_channel/lib/src/thermion_flutter_method_channel_platform.dart +++ b/thermion_flutter/thermion_flutter_method_channel/lib/src/thermion_flutter_method_channel_platform.dart @@ -174,16 +174,16 @@ class ThermionFlutterMethodChannelPlatform extends ThermionFlutterPlatform { .createTexture(descriptor.width, descriptor.height, importedTextureHandle: descriptor.hardwareId, flags: { - // TextureUsage.TEXTURE_USAGE_BLIT_DST, + TextureUsage.TEXTURE_USAGE_BLIT_SRC, TextureUsage.TEXTURE_USAGE_COLOR_ATTACHMENT, TextureUsage.TEXTURE_USAGE_SAMPLEABLE }, - textureFormat: TextureFormat.RGBA8, + textureFormat: TextureFormat.RGBA32F, textureSamplerType: TextureSamplerType.SAMPLER_2D); final depth = await FilamentApp.instance! .createTexture(descriptor.width, descriptor.height, flags: { - // TextureUsage.TEXTURE_USAGE_BLIT_DST, + TextureUsage.TEXTURE_USAGE_BLIT_SRC, TextureUsage.TEXTURE_USAGE_DEPTH_ATTACHMENT, TextureUsage.TEXTURE_USAGE_SAMPLEABLE, },