Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

[flame_3d] Allow rendering World3D at a fraction of the device resolution

Abierto
#4,150 0 comentarios 1 reacción 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
45/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
dart, flutter
Área
game-dev

Línea de trabajo

Start from World3D.renderFromCamera, where the render size passed to beginPass is computed, and the FlameGame3D game class that would expose renderResolutionScale. Read the existing drawImageRect upscale path and the MSAA option before changing anything, then verify the default scale leaves rendering unchanged. Done means the scale is clamped, the upscale filter and MSAA interaction are decided, and the 3D rendering tests/examples still pass.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Problem to solve

World3D.renderFromCamera always renders the scene at the viewport size multiplied by the device pixel ratio, for example 2556x1179 on an iPhone 15 Pro or 1920x1080 on an AYN Thor, then draws the result into the viewport. On dense handheld screens that resolution often costs more fill rate than it adds visible detail, especially for stylized or pixel-art 3D, and there is no way to lower it today without copying World3D.

Proposal

Expose a render resolution scale on the 3D game, for example FlameGame3D.renderResolutionScale, defaulting to 1.0 and clamped to a range such as [0.25, 1]. World3D would multiply it into the render size passed to beginPass, and the existing drawImageRect would scale the smaller image back up to the viewport, so games that keep the default see no change.

Two open questions:

  • whether the game should also choose the filter used for that upscale (nearest suits pixel art, linear suits most other styles);
  • how it should combine with the new MSAA option, since a lower resolution with MSAA is a common trade-off on mobile.
More information

We run this change on a local copy of flame_3d in a game built on it, with a scale of 0.5 on Android and iOS devices whose pixel ratio is at least 2. On an AYN Thor, on the same route through a night scene, the raster wait per frame went from 6.52 ms to 0.47 ms on average (p90 from 11.31 ms to 0.53 ms), and frames over 33 ms went from 12 of 248 to 2 of 247.

The change only touches World3D and the game class. I'm happy to open a PR if this direction suits you.

Other
  • Are you interested in working on a PR for this?
Lenguaje dominante
Dart
Estrellas
10.8k
Forks
1.1k
Merge medio
1 d 21 h
PR fusionados (30 d)
52

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de flame-engine/flame

Todos los issues de flame-engine/flame

Issues similares

Más issues de Dart

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.