From e1446c7eb8fa88f02fb32264a7602a1629990e35 Mon Sep 17 00:00:00 2001 From: Nick Fisher Date: Mon, 10 Mar 2025 22:21:25 +0800 Subject: [PATCH] more VDTM work --- thermion_dart/test/texture_tests.dart | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/thermion_dart/test/texture_tests.dart b/thermion_dart/test/texture_tests.dart index f2471159..db8e3090 100644 --- a/thermion_dart/test/texture_tests.dart +++ b/thermion_dart/test/texture_tests.dart @@ -194,6 +194,7 @@ void main() async { await material.setParameterFloat4( "baseColorFactor", 1.0, 1.0, 1.0, 1.0); }; + await resetMaterial(); await fn(cube, material, resetMaterial); } @@ -258,11 +259,10 @@ void main() async { int channels, Future Function(Texture texture, MaterialInstance mi) fn) async { final sampler = await viewer.createTextureSampler(); - final numCameraPositions = 3; var texture = await viewer.createTexture(width, height, textureSamplerType: TextureSamplerType.SAMPLER_3D, - depth: numCameraPositions, + depth: cameraPositions.length, textureFormat: TextureFormat.RGBA32F); final vdtm = await viewer.createMaterial( @@ -293,9 +293,9 @@ void main() async { final camera = await viewer.getMainCamera(); final (numCameraPositions, width, height, channels) = - (cameraPositions.length, 1, 1, 1); + (cameraPositions.length, 1, 1, 4); - usingVDTM(viewer, cameraPositions, width, height, channels, + await usingVDTM(viewer, cameraPositions, width, height, channels, (texture, materialInstance) async { for (int i = 0; i < numCameraPositions; i++) { final pixelBuffer = Float32List.fromList([