more VDTM work
This commit is contained in:
@@ -194,6 +194,7 @@ void main() async {
|
|||||||
await material.setParameterFloat4(
|
await material.setParameterFloat4(
|
||||||
"baseColorFactor", 1.0, 1.0, 1.0, 1.0);
|
"baseColorFactor", 1.0, 1.0, 1.0, 1.0);
|
||||||
};
|
};
|
||||||
|
await resetMaterial();
|
||||||
|
|
||||||
await fn(cube, material, resetMaterial);
|
await fn(cube, material, resetMaterial);
|
||||||
}
|
}
|
||||||
@@ -258,11 +259,10 @@ void main() async {
|
|||||||
int channels,
|
int channels,
|
||||||
Future Function(Texture texture, MaterialInstance mi) fn) async {
|
Future Function(Texture texture, MaterialInstance mi) fn) async {
|
||||||
final sampler = await viewer.createTextureSampler();
|
final sampler = await viewer.createTextureSampler();
|
||||||
final numCameraPositions = 3;
|
|
||||||
|
|
||||||
var texture = await viewer.createTexture(width, height,
|
var texture = await viewer.createTexture(width, height,
|
||||||
textureSamplerType: TextureSamplerType.SAMPLER_3D,
|
textureSamplerType: TextureSamplerType.SAMPLER_3D,
|
||||||
depth: numCameraPositions,
|
depth: cameraPositions.length,
|
||||||
textureFormat: TextureFormat.RGBA32F);
|
textureFormat: TextureFormat.RGBA32F);
|
||||||
|
|
||||||
final vdtm = await viewer.createMaterial(
|
final vdtm = await viewer.createMaterial(
|
||||||
@@ -293,9 +293,9 @@ void main() async {
|
|||||||
final camera = await viewer.getMainCamera();
|
final camera = await viewer.getMainCamera();
|
||||||
|
|
||||||
final (numCameraPositions, width, height, channels) =
|
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 {
|
(texture, materialInstance) async {
|
||||||
for (int i = 0; i < numCameraPositions; i++) {
|
for (int i = 0; i < numCameraPositions; i++) {
|
||||||
final pixelBuffer = Float32List.fromList([
|
final pixelBuffer = Float32List.fromList([
|
||||||
|
|||||||
Reference in New Issue
Block a user