[flame_3d] Allow rendering World3D at a fraction of the device resolution
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
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
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de flame-engine/flame
-
enhancement
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
flame-engine/flame#4176 ·
Los mantenedores suelen responder en 1 día
-
discussion enhancement
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
flame-engine/flame#4175 ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
flame-engine/flame#4174 ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
flame-engine/flame#4173 ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 4/5 3-5 días Aptitud para principiantes 55/100
flame-engine/flame#4172 ·
Los mantenedores suelen responder en 1 día
Todos los issues de flame-engine/flame
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
aaronified/fluenough#918 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
VeryGoodOpenSource/very_good_analysis#255 ·
Los mantenedores suelen responder en 1 día
-
TButton 小尺寸时文字在垂直方向不居中,有点偏下Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Tencent/tdesign-flutter#1233 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Host the SideStep "Decaid installer" as a permanent pre-release asset (tag sidestep-installer)?Abiertoneeds-triage
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
decentespresso/decaid#1069 ·
Los mantenedores suelen responder en 1 día