feat: allow passing renderTargetColorTextureFormat via ThermionFlutterOptions

This commit is contained in:
Nick Fisher
2025-07-17 12:10:55 +08:00
parent 437e91e7bd
commit d92ad4ef12
2 changed files with 17 additions and 11 deletions

View File

@@ -212,7 +212,7 @@ class ThermionFlutterMethodChannelPlatform extends ThermionFlutterPlatform {
TextureUsage.TEXTURE_USAGE_COLOR_ATTACHMENT,
TextureUsage.TEXTURE_USAGE_SAMPLEABLE,
},
textureFormat: TextureFormat.RGBA32F,
textureFormat: options.renderTargetColorTextureFormat,
textureSamplerType: TextureSamplerType.SAMPLER_2D,
);
final depth = await FilamentApp.instance!.createTexture(
@@ -225,7 +225,7 @@ class ThermionFlutterMethodChannelPlatform extends ThermionFlutterPlatform {
TextureUsage.TEXTURE_USAGE_STENCIL_ATTACHMENT
},
textureFormat:
TextureFormat.DEPTH24_STENCIL8, // TextureFormat.DEPTH32F,
options.renderTargetDepthTextureFormat,
textureSamplerType: TextureSamplerType.SAMPLER_2D,
);