-
Notifications
You must be signed in to change notification settings - Fork 29
Open
Labels
renderingBehavior when preparing or drawing geometry to the screen.Behavior when preparing or drawing geometry to the screen.
Description
Hey,
I've been playing with the package for a few days now, and managed to successfully load models, created a new Camera which allows for free transformation etc. - but one thing I cannot seem to understand is why models I load look pixelated, but only when exceeding a certain polycount.
The FlutterLogo from the example looks perfectly fine, yet any higher poly models end up being pixelated.
This is my CustomPainter:
class _ScenePainter extends CustomPainter {
final Scene scene;
final OrbitCamera orbitCamera;
_ScenePainter(this.scene, this.orbitCamera);
@override
void paint(Canvas canvas, Size size) {
// Render scene using updated camera
scene.render(
orbitCamera.camera,
canvas,
viewport: Offset.zero & size,
);
}
@override
bool shouldRepaint(covariant CustomPainter oldDelegate) => true;
}
and setting antiAlias and filterQuality did not change anything, except now it looks more muddy than it did before:
class _ScenePainter extends CustomPainter {
final Scene scene;
final OrbitCamera orbitCamera;
_ScenePainter(this.scene, this.orbitCamera);
@override
void paint(Canvas canvas, Size size) {
// Create a Paint with anti-alias and high filter quality.
final paint = Paint()
..isAntiAlias = true
..filterQuality = FilterQuality.high;
// Draw the scene onto an offscreen layer with the custom paint.
canvas.saveLayer(Offset.zero & size, paint);
scene.render(
orbitCamera.camera,
canvas,
viewport: Offset.zero & size,
);
canvas.restore();
}
@override
bool shouldRepaint(covariant CustomPainter oldDelegate) => true;
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
renderingBehavior when preparing or drawing geometry to the screen.Behavior when preparing or drawing geometry to the screen.