create material for texture baking
textures can now be created manually and are no longer tracked by SceneManager (and therefore require manual tracking/disposal)
This commit is contained in:
@@ -20,6 +20,7 @@ import 'package:path/path.dart' as p;
|
||||
Color kWhite = ColorFloat32(4)..setRgba(1.0, 1.0, 1.0, 1.0);
|
||||
Color kRed = ColorFloat32(4)..setRgba(1.0, 0.0, 0.0, 1.0);
|
||||
Color kGreen = ColorFloat32(4)..setRgba(0.0, 1.0, 0.0, 1.0);
|
||||
Color kBlue = ColorFloat32(4)..setRgba(0.0, 0.0, 1.0, 1.0);
|
||||
|
||||
/// Test files are run in a variety of ways, find this package root in all.
|
||||
///
|
||||
|
||||
@@ -22,6 +22,7 @@ void main() async {
|
||||
textureFormat: TextureFormat.RGBA32F);
|
||||
await texture.setLinearImage(
|
||||
image, PixelDataFormat.RGBA, PixelDataType.FLOAT);
|
||||
await texture.dispose();
|
||||
}, bg: kRed);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user