flutter_scene 0.21.0
flutter_scene: ^0.21.0 copied to clipboard
A flexible realtime 3D engine for Flutter games and apps, with glTF models, physics, skeletal animation, and PBR lighting.
0.21.0 #
-
Requires Flutter 3.47.0 or newer. That is the first stable carrying the Flutter GPU support this package needs, so the constraint is a real minimum rather than the loose value earlier releases carried. A master build numbered
3.47.0-1.0.pre.Nsorts below it and will not resolve. -
Assets are generated into
flutter_scene_generated/at the app root and loaded by source path, the same way on every Flutter channel.dart run flutter_scene:initinstalls the hook, creates the directory with a.gitignorefor its outputs, and adds the one pubspec assets entry it needs. -
flutter pub add flutter_sceneis the whole setup. flutter_scene's own build hook compiles the engine's shaders for the app being built, on every channel, so an app with no hook of its own renders a runtime-imported.glbeverywhere including web. -
Compiled shader bundles record the engine that built them and are rebuilt when it changes, so switching Flutter versions cannot leave a bundle the new engine refuses to read.
-
buildEngineAssetsis an optional build-hook call that puts the engine's shaders in the app's own generated tree instead of flutter_scene's. -
Breaking change,
legacyOnlyanddataAssetsIfAvailableare removed in favor ofgeneratedTree, now the default inSceneAssetMode,TextureAssetMode,MaterialAssetMode, andTargetShaderBundleAssetMode. A hook still passing a removed mode fails the build naming its replacement, since outputs moved out ofbuild/into the generated tree and an app loading by explicit asset key reads its new keys from the tree'smanifest.json. Re-rundart run flutter_scene:initto migrate a hook and add the pubspec entry. The Dart data assets modes remain as explicit opt-ins and prune the tree entries they replace. -
A build with no generated assets now fails with the exact pubspec lines to add instead of producing an app that dies at its first load.
-
Fixed a
.fmatreference written against the package root binding to a path beside its scene document, which left the material unresolved at load and the geometry on an opaque fallback. A reference only rebases onto the document when a file is actually there, matching how the source-root loader reads the same scene. -
resolveShaderBundleKeyresolves a shader bundle built bybuildTargetShaderBundleJson(orflutter_gpu_shaders) by name, forloadShaderLibraryAsync. -
Build stamps fingerprint a source over a megabyte by size and modification time instead of reading it, cutting about 5 seconds per gigabyte off every build. Set
flutter_scene_strict_hashing: trueunderhooks: user_defines:in the app pubspec to content-hash everything. -
Switching asset modes needs a clean build. Nothing prunes assets from a previous mode out of an app bundle.
-
Breaking change,
buildScenesandbuildTexturesno longer takeoutputDirectory. Outputs go to the app's generated tree, so a hook passing it fails to compile; drop the argument. -
Breaking change,
FmatMaterialBundleIndex.fromJsonrequiresassetKey. The bundle and its sidecar resolve from the index's own key, so a direct caller passes the key it parsed. -
Node.extractMeshDataflattens a subtree's geometry into oneMeshDatawith the descendant transforms baked in, andMeshData.toTriMeshShape/toConvexHullShapeturn that into a collider, so an imported model no longer needs a hand-written walk to collide. -
MeshData.transformedplaces a snapshot by a matrix, carrying normals by the inverse transpose and, through a mirror, flipping both tangent handedness and triangle winding. -
The lit shaders declare one prefiltered-radiance sampler instead of one per layout, freeing two fragment texture units so a skinned shadow-casting draw fits GLES drivers reporting the 16-unit minimum.
-
Breaking change for raw
ShaderMaterialshaders that sample the environment, they declareprefiltered_radianceasRadianceSamplerand supply aradianceCubeFragmentShadervariant built withFLUTTER_SCENE_RADIANCE_CUBE..fmatmaterials are unaffected. -
A material or sky that samples the environment without a cubemap-radiance variant now keeps its 2D sampler and is bound a placeholder instead of a mismatched cubemap, and says so in debug builds.
PreprocessedMaterialtakesradianceCubeFragmentShaderfor code that builds one directly rather than through a loader. -
Breaking change,
EnvironmentMap.prefilteredRadianceTextureandEnvironmentMap.prefilteredRadianceCubeare gone. The single prefiltered-radiance sampler replaces the layout pair, so code reading either field reads the one texture the map now carries. -
RenderItem.windingFlippedderives from its geometry instead of being assignable, so a mirrored transform reverses winding without callers tracking it. -
Breaking change, the fscene component codec API is declarative.
ComponentCodec.serializeis abstract,ComponentPropertyDefandComponentPropertyKindmoved to thesceneschema model (constraints replacemin/max/read), and flat codecs extendDeclarativeComponentCodec, deriving schema, realization, and delta serialization from oneComponentFieldlist. -
.fsceneversion 3. Component properties delta-serialize (values equal to their schema default are omitted) and audio attenuation settings nest; version 2 documents read unchanged. -
package:flutter_scene/annotations.dart,@SceneComponentand typed property annotations that lower to schema constraints for generated codecs. -
Unknown component types realize as lossless
ForeignComponentplaceholders and round-trip untouched. -
Physics components register in any mount order. A rigid body, collider, joint, or character controller added before its world (or its sibling dependency) registers when the dependency arrives instead of staying inert.
-
registerPhysicsBackendis public, so physics backend packages can register simulation factories the way audio backends do. -
FsceneComponentRegistry.unregisterremoves a registered codec; documents carrying the type realize it as a lossless unknown-type placeholder. -
nodeRefOfandresourceRefOfrecover document references from live nodes and realized resources, so custom codecs (generated ones included) round-trip them. -
Debug builds launched with
FLUTTER_SCENE_SOURCE_ROOTread scene sources straight from the project, andext.flutter_scene.reloadScenepatches loaded scenes in place. -
Component schemas carry declarative editor gizmos (
ComponentSchema.gizmo, theGizmoSpecprimitive model, the@SceneGizmoannotation), and the builtin lights, camera, colliders, audio, environment volumes, and particle emitters declare them. -
Builtin component schemas declare richer editing constraints, the camera projection is a fixed-option enum, its field of view carries hard degree bounds, and shadow, area-light, and volume fields gained slider soft ranges.
-
Scene.captureRenderGraphrecords one frame's render graph (passes, CPU timings, data flow, snapshot copies of written targets) behind theScene.debugAllowRenderGraphCaptureopt-in, andRenderPassContext.debugBlackboardTextureexposes raw pipeline textures to debug overlays. -
Screen-space contact shadows for the sun via
DirectionalLight.contactShadows, grounding small contacts that shadow-map resolution and bias miss. -
Screen-space indirect light via
AmbientOcclusionSettings.indirectLight, crediting one bounce of scene radiance to newly visible sectors of the occlusion bitmask. -
Rect area lights via
RectAreaLightandRectAreaLightComponent, shaded with linearly transformed cosines so panel highlights stretch and fall off physically. -
Film-look color grading via
ColorGradingSettings.lut, loading Adobe.cubetables withColorLut.fromCubeAssetand blending withlutBlend. -
Environments persist the grading LUT (
.cubereference and blend) in.fscenedocuments, andColorLut.sourceAssetreports where a table was loaded from. -
Percentage-closer soft shadows via
DirectionalShadowFilter.pcss, sharpening shadows at contact and widening them with caster distance scaled byDirectionalLight.angularRadius. -
Depth of field focuses on translucent depth-writing surfaces (fmat
depth_write: true, transmissivePhysicallyBasedMaterial) instead of the backdrop seen through them. -
Ground-truth ambient occlusion via
AmbientOcclusionSettings.method, integrating horizon-slice visibility withsliceCount/stepsPerSlicecontrols and an optional constant-thicknessvisibilityBitmaskmode. -
AmbientOcclusionSettings.multiBouncekeeps albedo-tinted bounce light in occluded creases instead of darkening them to gray. -
AmbientOcclusionSettings.bentNormalssteers indirect diffuse along the average unoccluded direction and enablesSpecularAmbientOcclusionMode.bentCone. -
Environment resources persist every ambient-occlusion control, including the new method, slice, thickness, bent-normal, and multi-bounce fields.
-
AmbientOcclusionSettings.intensitydefaults to1.0and both methods are calibrated there; the obscurance estimator folds its former 2x, so halve any explicitly set obscurance intensity to keep its look. -
Retuned enable-time defaults, bloom intensity
0.15, chromatic aberration0.2, and auto-exposure clamps of -4 to +4 EV. -
Breaking change,
.fsceneversion 2 uses one native coordinate system and offline glTF import bakes source coordinates into it. -
Removed
Handedness,UpAxis,StageMetadata.unitsPerMeter,NodeSpec.excludeFromWindingParity,SkyEnvironmentSpec.castShadows, and the directional-light component schema'sdirectionproperty. -
Runtime glTF import keeps source buffers unchanged and resolves coordinate winding in the renderer.
-
Directional-light nodes aim along native local +Z and support explicit primary-light priority.
-
Fscene directional lights preserve the complete cascaded-shadow configuration.
-
Text scenes can reference a binary payload sidecar with
payloadSource. -
Fixed world-transform assignment under transformed parents corrupting the parent's cached transform.
-
Fixed in-memory glTF import dropping punctual lights and material variants.
-
GPU memory can be inspected and released.
takeMemoryReport()reports what the engine's shared caches are pinning,releaseTexture/releaseScenegive a claim back, andclearTextureCache/clearSceneTemplateCachedrop everything. -
ResourceGroup.trackscopes a load to the group's lifetime, sodispose()releases the claims it took. Previouslydispose()only released the progress notifier despite the name. -
Fixed
ResourceGroupthrowing when it was disposed while a tracked load was still in flight, which is what tearing down a level mid-load does. -
Fixed
loadScenekeeping a scene template claim when it threw after the template loaded, so a caller that got noNodeno longer has to issue a compensatingreleaseScene. -
PhysicallyBasedMaterialand glTF import support every ratifiedKHR_materials_*extension with scene-native property names. -
Scene startup loads the shared physical-material shader bundle so every
PhysicallyBasedMaterialproperty remains synchronous. -
Shader build hooks keep only the target platform backends in generated bundles.
-
KHR_texture_transformapplies independently to every built-in and advanced material texture. -
Geometry and material textures support both UV0 and UV1, including
textureInfo.texCoordin both glTF import paths. -
ShaderMaterialowns the vertex stage too. Pass avertexShader(perMeshVariant, so skinned and shadow passes can differ) and set uniforms and textures on either stage withShaderStage, so a hand-written shader pair needs no subclassing. -
Geometry can declare its own pipeline vertex layout with
setVertexLayout, andVertexAttributeDescriptor/VertexBufferDescriptor/VertexLayoutDescriptorare public. -
Custom vertex attributes work on skinned meshes.
-
A
ShaderMaterialthat supplies a vertex shader for some mesh kinds but not others warns in debug builds, naming the missing variant, instead of failing opaquely at pipeline creation. -
Debug builds check a custom material's uniform blocks against the shader's reflection, so a misspelled or optimized-out block name and a buffer too small for its std140 layout raise named exceptions instead of failing at bind time or reading past the end.
-
Debug builds check a caller-declared vertex layout against the buffers actually bound, so a slot count mismatch raises instead of feeding the pipeline undefined vertex data.
-
IndexType,VertexFormat, andVertexStepModeare exported, so 32-bit indices and caller-declared layouts no longer needlib/srcimports. -
Made first-party shader/material hooks and examples DataAssets-only, with migration guidance for legacy assets.
-
buildMaterialsregisters generated outputs as DataAssets when available by default. -
Added
Node.castsShadowsfor excluding individual meshes from shadow passes. -
Added
GeometryBufferArenaandGeometryBuilder.build({bufferArena, retainCpuData})for lower-overhead immutable mesh batches. -
Added per-instance colors through
InstancedMesh.addInstance(color:)andsetInstanceColor. -
Breaking change, instanced vertex layouts now require
instance_colorand use an 80-byte instance stride instead of 64 bytes. -
Added
InstancedMesh.updateInstanceTransformsfor allocation-light bulk motion andInstancedMesh.cullInstancesfor opt-in per-instance culling. -
Added
InstancedMesh.sortTransparentInstancesto skip unnecessary particle sorting. -
Added
RenderView.cullingPlanesfor application-defined frustum planes andScene.warmUp(includeOffscreen:)for full-scene preparation. -
Added
SunLight.cacheStaticShadowsandDirectionalLight.cacheStaticShadowsfor continuously changing shadow lights. -
Added
SunLight.shadowFilterandDirectionalShadowFilter.fixedPcffor stable lower-ALU shadow filtering. -
Tightened stable cascade fitting to increase effective shadow resolution.
-
Reduced shadow-map color bandwidth with single-channel fp32 tiles.
-
Fixed cascade-edge striping from normal-biased receiver positions.
-
Switched material and resolve color conversion to exact sRGB transfer functions.
-
Cached instanced bounds and render data to keep moving-camera culling allocation-light.
-
Skipped per-instance bounds packing when instance culling is disabled.
-
Skipped per-instance culling when an entire batch is inside every active plane.
-
Reused large transient buffers across changing instance counts.
-
Translucent instanced meshes now sort as one batch, with instances ordered within it.
-
Translucent draws sort back to front by view-axis depth through their geometry bounds center.
-
Double-sided lit materials reverse geometric normals on back-facing fragments.
-
Fixed instanced meshes losing their lighting, shadow, and fog bindings on GLES, which drew them (and any mesh sharing their pipeline) black.
-
Fixed anisotropy strength being ignored by environment lighting and using an isotropic visibility term for analytic lights.
-
Fixed anisotropic materials exposing primitive triangles by importing and interpolating authored tangents.
-
Vertex payload layouts include UV1 and tangents under versioned names, growing unskinned payloads by 50% and skinned payloads by 30%; older
.fscenelayouts upgrade when loaded. -
Fixed runtime glTF normal maps building color-filtered mips, which skewed minified normals and washed out reflective materials.
-
Fixed uncompressed
.fscenebtextures uploading without mipmaps, so a cooked scene is mipmapped whether or notcompressTexturesis set. -
Fixed cooked
.fsceneband.fstextextures sampling without anisotropic filtering, which blurred them at grazing angles. -
Texture resources record what their pixels represent, so mip levels downsample by role (normal maps average as vectors, color in linear light).
-
buildSceneswarns when a texture is not block aligned and falls back to uncompressed, instead of dropping the compressed form silently. -
buildScenesandbuildTexturestakealignForCompressionto resample a misaligned source up to the next multiple of 4 rather than failing or storing it uncompressed. -
Cooked textures build their mip chain on a background isolate, so a large uncompressed scene no longer pays for it on the calling thread.
-
Devices measured to sample every texture at its base mip skip mip chains entirely, reclaiming the memory and transcode time they were spending on levels the sampler ignores, and say so once at startup.
-
Loose images cook to compressed, mipmapped
.fstexthroughbuildTextures, loaded by source path withloadTexture(shipped in 0.20.0, missing from its notes). -
Fixed a
RangeErrorwhen an updatable mesh rebuilds at a smaller vertex count. -
Fixed ambient-occlusion banding and over-darkening with normalized sampling, robust normals, and depth-aware filtering.
-
Ambient occlusion gains power, detail, horizon, direct-light, depth-mip, and specular controls. Intensity now scales obscurance, defaults to
2.0, and its former contrast role ispower. -
Baked and screen-space ambient occlusion now combine with
mininstead of multiplication. -
Added
ToneMappingMode.agxwith configurableScene.agxWhiteandScene.agxContrast, persisted by environment resources. -
Added
Material.depthBias, a world-space camera offset for coplanar surface details. -
Breaking change, custom
Geometry.bindoverrides must add the named parameterdouble depthBias = 0.0. -
EnvironmentSettingspreserves every ambient-occlusion control and can apply only its environment look withapplyLookTo. -
Added
EnvironmentMap.constantDiffuseand declarativeConstantEnvironmentambient lighting. -
Added declarative torus and icosphere geometry specs.
-
ParticleSystem.prewarmis now readable after construction. -
Nested prefab material overrides and linked material/scene references now compose and round-trip.
-
Custom asset bundles can load fmat shaders from bytes and provide their own fmat material loader.
-
Cooked glTF scenes import photometric punctual lights for use with physical camera exposure.
0.20.0 #
- The
.fscenedocument core (document model, stable ids, JSON/binary serialization, prefab composition, diffing) moved to the new pure-Dartscenepackage;flutter_scenere-exports it, so existing imports are unchanged. - Fixed the web backend dropping every uniform-block draw on drivers that pad uniform block sizes (Mesa on Linux).
- New declarative scene API.
SceneView.declarative,SceneNode,SceneMesh, andSceneModeldescribe scenes inbuild(), with bridges to and from the imperative API, which is unchanged. - Declarative animation control via
SceneModel.animations(SceneAnimationSpec), plus cached model templates so equal sources load once and share GPU resources. KHR_materials_variantssupport in both import paths viaMaterialsVariantsComponent, declaratively viaSceneModel.variant, with a new Configurator example.- Fixed animation blending collapsing rigs with mirrored bones.
- Fixed slerp taking the long arc when interpolating between quaternions in opposite hemispheres.
- Automatic exposure (eye adaptation) via
Scene.autoExposure, metered entirely on the GPU. - Imported materials keep their source names via the new
Material.name. - Fixed cloned skinned meshes all drawing with the last-updated skeleton.
- Physics backends now implement the pure
PhysicsSimulationcontract from thescenepackage and no longer depend on Flutter, so the same simulations run under plaindart run. - One generic physics component layer for every backend.
PhysicsWorld(RapierWorld()), plus concreteRigidBody,Collider, the joint components, andKinematicCharacterController; the backend-specific component classes are gone. - Backend-specific physics features stay first-class.
RigidBody.handle,Collider.handles, andJoint.handleare public, so downcastingPhysicsWorld.simulationto a backend reaches capabilities beyond the shared contract, and the components subclass for typed backend components. - Physics is now an optional sub-barrel. Import
package:flutter_scene/physics.dart(orpackage:scene/physics.dartfor the pure contract); the corepackage:flutter_scene/scene.dartno longer carries physics types. BasicSimulation(queries and triggers, pure Dart) replacesBasicPhysicsWorld/BasicCollider/BasicKinematicBody.- Colliders without a sibling
RigidBodynow attach as static geometry instead of throwing. - Spatial audio through an optional pluggable-backend contract.
AudioEngine(implemented byflutter_scene_soloudandflutter_scene_fmod), withAudioListener,AudioSource/ClipAudioSource,AudioBus, and distance attenuation. Importpackage:flutter_scene/audio.dart; it is not in the core barrel. - CPU particle systems are now public.
ParticleEmitterComponent(camera-facing billboards),MeshParticleEmitterComponent(instanced 3D debris), andTrailComponent(ribbon trails), all driven by aParticleSystembuilt from emitter shapes, spawners, over-life distributions, and a module stack (acceleration, drag, size/color-over-life, rotation, flipbook, curl-noise turbulence), with new Particles and Explosion examples. - Sprites and billboard particles depth-test against opaque geometry again, so closer objects occlude them.
0.19.0 #
- Steady-state frame allocations cut sharply. Fullscreen passes reuse cached pipelines and per-draw uniform packs reuse scratch buffers.
- Faster draw submission. Bindings clear only on pipeline change and the engine lighting set rebinds only when it actually changes.
- Cheaper
MeshGeometry.fromArraysfor streamed meshes. Bulk attribute copies, no repack for typed index lists, and an optional caller-suppliedbounds. - Depth of field with shaped bokeh via
scene.depthOfField, driven by a thin-lens camera model with three quality tiers. - Cached shadow tiles for nodes marked
shadowStatic, making static-world shadow rendering near free. - Alpha-masked materials are now alpha-tested in the shadow and depth passes, so cutouts cast and receive correctly.
- Materials can declare per-frame scene inputs (
scene_color,scene_depth) for refraction and depth-fade effects, andMaterialInputsgainsspecular. - Fixed
.fmatskies withrequires: [environment]sampling black on the roughness-mip layout, andShaderSkySource.sampledEnvironmentpins the sampled map. - The lit shader reads diffuse SH through one sampler, fixing skinned-mesh crashes on 16-unit GLES drivers (ANGLE on Windows).
- Fixed white speckles in compressed textures on devices preferring BC formats.
- Scene-graph conveniences.
Node.meshNodes,Node.combinedWorldBounds, andPerspectiveCamera.framing. - 3D Gaussian splatting. Load
.ply/.splatcaptures withGaussianSplatsand draw them withSplatComponent, with a new example. - Scene content can be exposed to assistive technology via
SemanticsComponent, including hosted widget-surface semantics. WidgetComponentgains opt-inocclusionHiding.- Added
Camera.worldToScreen. - A failed static-resource load no longer marks the engine ready to render; it retries instead of crashing mid-frame.
- Point and spot lights.
PointLightComponentandSpotLightComponent, unlimited BVH-culled lights, spot shadows,KHR_lights_punctualimport, and a Lights example. - Geometry readback and derivation.
Geometry.extractMeshData(),MeshDataops (unweld,extractEdges,merge), andLineSegmentsGeometryfor thick lines. - Per-frame transient GPU data rides a completion-aware arena allocator, fixing whole-frame aborts past ~1MB of transients and collapsing per-draw buffer writes.
- BREAKING: the custom-pass and material/geometry
bindsurfaces take aTransientWriterwhere they previously took agpu.HostBuffer. - Large speedup for many-draw scenes on the web backend. No more per-draw buffer ghosting, vertex state cached in VAOs, redundant sampler calls skipped.
- The web shim's
HostBufferis a faithful flutter_gpu port again. - On the web backend, an active but unbound uniform block reads zeros instead of rejecting the draw, fixing unlit
.fmatmaterials rendering nothing. - Fixed ambient occlusion and reflections sampling the wrong depth for double-sided materials.
- The
.fmatcompiler no longer lets declared but unread resources strip out of the generated shaders, which surfaced as build errors or draw-time crashes. - Built-in noise matched between CPU and GPU via
package:flutter_scene/noise.dartand#include <noise.glsl>(the Dart side is native-only for now). AmbientOcclusionSettings.depthMipChain(off by default) keeps occlusion accurate on grazing surfaces and large radii.- Distance fog via
scene.fog, with falloff modes, a height term, light in-scatter, and sky-color blending. - Custom render passes via
Scene.addRenderPass, powering the newNode.highlightColorselection outlines. - Custom passes can request scene buffers (
depth,normals,shadowMap) throughRenderInput. - Volumetric god rays via
scene.godRays. - Load gating and warm-up.
ResourceGroup,SceneView.loading/revealMinDuration,Scene.warmUp, and background-isolate GLB geometry packing. - Widget-texture captures stay on the GPU on texture-backed platforms, removing the per-capture CPU round trip.
.fmatmaterials gain a vertex stage (aVertex()hook,varyings, customattributes), applied consistently across the color, shadow, depth, and pick passes.- Built-in materials and geometries can now be constructed before
Scene.initializeStaticResources()completes. - Added
Scene.camerawithCameraComponentauto-promotion, and a default camera so a bareSceneView(scene)always renders. - Camera-facing billboards and sprites via
BillboardGeometry,SpriteMaterial, andSprite. - Directional-shadow controls.
shadowAmbientStrength,shadowCasterFaces, and cascades that extend toward the sun so long shadows stop dropping out. - Fixed the cascaded-shadow lookup misreading cascades on GLES and crashing the shader compiler on Windows.
- BREAKING: vertex layouts are described by
VertexLayoutDescriptorand unskinned geometry is structure of arrays (.fscenegainsunskinned_soa; old files still load). - New procedural primitives. Cylinder, capsule, torus, disc, ring, and icosphere, each with a
collisionShapephysics bridge. - Geometry level of detail via
LodComponent, with screen-size selection, hysteresis, and dithered cross-fade. - Image-based lighting prefilters into a mipped radiance cubemap, and
EnvironmentMap.fromEquirectHdrkeeps HDR intensity through the prefilter. - Spatial environment volumes with camera-driven blending via
EnvironmentSettings,Scene.baseEnvironment, andEnvironmentVolume. - Sky-driven sun light via
Scene.sunLight, aiming and coloring the directional light from the sky. - BREAKING:
.fscenestages reference an environment resource instead of inline stage fields, and prefab host-node additions areAttachments. - Added
Texture2D(generated mips, trilinear and anisotropic filtering) withTextureContent/TextureSampling; imported models are now mipmapped. - BREAKING: material texture slots hold a
TextureSourceinstead of a rawgpu.Texture. - Added
TextureAtlasfor uniform tile grids. - Added geometric specular antialiasing to
PhysicallyBasedMaterial. - Fixed the split-sum specular lookup sampling with its roughness axis flipped.
- Fixed image-based lighting taking the shadow-ambient gate and Fresnel term from the normal-mapped normal.
- Fixed
normalScalenot being applied to the perturbed normal. - Screen-space reflections via
Scene.screenSpaceReflections, with an example and live tuning panel. - Screen-space reflections fade out on rough surfaces.
- The environment BRDF lookup is generated at load as
RGBA16F, removing banding and the bundled PNG.
0.18.1 #
- No code changes. Reworded the package description and added the logo as a pub.dev screenshot.
0.18.0 #
- Offscreen render targets via
RenderTexture,Scene.views, and theRenderTextureViewwidget. - The prefiltered-radiance environment stores roughness bands as mips of one texture (smoother transitions, ~25% less memory).
- Fixed dim image-based specular lighting on the web backend by re-baking radiance after the first presented frame.
- The base shader bundle loads asynchronously on every backend; await
Scene.initializeStaticResources()before constructing geometry or materials. - The
flutterSDK constraint is now>=3.44.0; the real requirement is a 2026-06-09 or later master build (see the README). - Render targets serialize in
.fscenevia arenderTextureresource kind and a top-levelviewsarray. - Material texture slots accept a
RenderTexturefor live render-to-texture sampling. - Added render scaling (
Scene.renderScale) and composite filtering (Scene.filterQuality), with per-view overrides. - Added FXAA and an automatic anti-aliasing mode;
autois the new default, so backends without MSAA now get FXAA. - Adopted hardware instancing for
InstancedMesh. Breaking for directVertexLayoutconstruction, which now takes a list ofVertexBuffers. - BREAKING: package exports are explicit show lists; file an issue if a symbol you used disappeared.
- Added scene raycasting via
Scene.raycast/raycastAll, with layer masks andNode.raycastable. - Added
WidgetComponent, a live interactive widget subtree on a scene surface. - Added automatic widget-surface input, with
WidgetInput.manualopt-out andSceneView.debugWidgetInput. - Added
ScenePointerfor programmatic scene input. - Added
WidgetTextureandCamera.screenPointToRay. - Added
UnlitMaterial.alphaMode. - Added
Surface.lastSwapchainColorTexturefor one-frame feedback effects. - Fixed vertically flipped texturing on the cuboid and wedge primitives.
0.17.0 #
- Added
SceneView, a widget that renders aSceneand drives its frame loop. - Added debug-mode hot reload for
.fmatmaterials and re-exported.glbscenes, patched in place. - Added DataAssets-backed GLB import with auto-discovery, cached composed documents, and
dart run flutter_scene:initwiring. - Added
AnimationClip.rebind/AnimationPlayer.rebindandMesh.clone. - Skinned geometry from
buildScenescarries a pose-union bound for sound frustum culling. - BREAKING: removed the
.modelformat; convert withbuildScenesor load GLBs at runtime. - BREAKING:
.fmatmaterials are discovered underassets/and loaded by source path vialoadFmatMaterial. - Building
.fmatmaterials and models requiresflutter_gpu_shaders0.5.0. - Added the
.fscene/.fscenebserialized scene format with prefabs, hot reload, and deterministic composition. - Added scene serialization via
serializeSceneandrealizeStage/serializeStage, round-tripping byte-stably. - Added opt-in KTX2 texture compression for imported scenes, transcoded at load off the main isolate.
- BREAKING: fixed vertically inverted image-based lighting; loaded panoramas now light correctly.
- Added a skybox via
Scene.skyboxand the built-inEnvironmentSkySource. - Added custom sky shaders via
ShaderSkySourceand.fmatskyblocks. - Added sky-driven lighting via
EnvironmentMap.fromSkyandScene.skyEnvironment, with time-sliced re-bakes. - Added built-in procedural skies,
GradientSkySourceandPhysicalSkySource. - Diffuse SH coefficients are sampled from a texture, and
fromGpuTexturesaccepts a GPU-computeddiffuseShTexture. - A
.fmatcompile failure during hot reload keeps the last good shaders and reports the error. - Build-hook conversions are cached by input content; set
FLUTTER_SCENE_DISABLE_BUILD_CACHEto always reconvert. - Fixed progressive slowdown on the web backend from leaked framebuffers and per-frame program re-links.
0.16.0 #
- Added an abstract physics contract (bodies, colliders, joints, queries, events) with a built-in kinematic world; a full backend ships in
flutter_scene_rapier. - Added
WedgeGeometry, a triangular-prism ramp primitive. - Added optional screen-space ambient occlusion via
Scene.ambientOcclusion, working on every backend.
0.15.1 #
- Added a DataAssets-backed
.fmatmaterial workflow with auto-discovery. - Added
dart run flutter_scene:init. - Added
FmatMaterialRegistryandloadFmatMaterial. - Updated
flutter_gpu_shadersto^0.4.5and moved hook-time dependencies tohooks2.x/data_assets0.20.x.
0.15.0 #
- Added the
.fmatcustom-material format, compiled bybuildMaterialsand driven at runtime with typed parameters. SeeMATERIALS.md. - Added a post-processing suite via
Scene.postProcess(bloom, color grading, vignette, chromatic aberration, film grain), each off by default. - Added
PostEffectfor custom post-processing shaders. SeePOST_PROCESSING.md. - The tone-mapping pass is now the resolve pass (exposure, grading, tone map, EOTF, bloom composite).
- Fixed image-based lighting on the OpenGL ES backend.
- Building
.fmatcustom materials requiresflutter_gpu_shaders0.4.4 or newer.
0.14.2 #
- Fixed mirrored geometry rendering inside-out; cull winding now follows the world-transform determinant.
- Fixed
material.doubleSidedbeing ignored by the runtime glTF importer.
0.14.1 #
- Now WASM-compatible; build-hook helpers no longer pull
dart:ioonto the web graph. - Added a package example and a fuller description.
- Bumped
flat_buffersto^25.9.23. - Internal lint and formatting cleanup.
0.14.0 #
Renderer overhaul, with several breaking changes.
- Rendering is structured as a render graph (
ShadowPass?->ScenePass->TonemapPass) with a transient-texture pool. - HDR pipeline. The scene renders to a float target and a tone-map pass writes the swapchain; custom shaders now output linear HDR premultiplied by alpha (see
MATERIALS.md). - Tone mapping and exposure moved onto
Scene(exposure,toneMapping,physicalCameraExposure). - Added
DirectionalLightwith PCF shadow mapping, assignable asScene.directionalLight. - Image-based lighting rework. SH-9 diffuse, a GPU-prefiltered specular atlas, and the old brightness fudges removed.
- BREAKING:
Environmentremoved in favor ofScene.environment(anEnvironmentMap) andScene.environmentIntensity. - BREAKING:
EnvironmentMapalways carries a prefiltered atlas plus SH-9; the proceduralEnvironmentMap.studio()is the new default. ShaderMaterial.useEnvironmentnow bindsprefiltered_radianceandbrdf_lut.- Web support. flutter_scene runs on Flutter web through a built-in WebGL2 backend, under both CanvasKit and Skwasm.
- BREAKING:
flutter_scene_importerfolded intoflutter_scene(package:flutter_scene/build_hooks.dart), with a curatedgpu.dartfor custom shaders.
0.13.0 #
- Added
ShaderMaterial, custom fragment shaders with uniform and texture binding by name and render-state knobs. - Added
MATERIALS.md, the custom-shader contract guide. - The example app gains a toon-shader demo.
0.12.0 #
- Added bounding-volume and frustum culling, with offline pose-union bounds for skinned content.
- New bounds API on
Geometry,Mesh, andNode, plusCamera.getFrustum.
0.0.1-dev.1 #
- Initial render box.
0.1.0 #
- Rewrite for Flutter GPU.
- Physically based rendering.
- More conventional interface for scene construction.
0.1.1 #
- Rename PhysicallyBasedMaterial and UnlitMaterial.
- Fix environment lighting problems in PhysicallyBasedMaterial.
- Add default environment map.
0.2.0 #
- Skinned mesh import.
- Fix readme for pub.dev.
0.2.1-0 #
- Switch to pre-release versioning.
- Bump version of flutter_scene_importer.
0.2.1-1 #
- Bump flutter_scene_importer version.
0.3.0-0 #
- Add animation playback (Animation, AnimationPlayer, AnimationClip).
- Import animations from scene models.
- Add support for cloning nodes.
0.4.0-0 #
- Support node cloning for skins.
- Fix default/animation-less pose.
0.5.0-0 #
- Support non-embedded/URI-only image embeds.
0.6.0-0 #
- Fix memory leak in transients buffer.
- Optional MSAA support on iOS and Android (enabled by default).
- Cull backfaces by default.
- Fix animation blending bugs.
- Pin native_assets_cli to <0.9.0.
- Add car model and animation blending examples.
- Fancy readme and FAQ.
0.7.0-0 #
- Update to native_assets_cli 0.9.0.
- Update to flutter_gpu_shaders 0.2.0.
0.8.0-0 #
- Update to Flutter 3.29.0-1.0.pre.242.
0.9.0-0 #
- Update to native_assets_cli 0.13.0.
- Update to flutter_gpu_shaders 0.3.0.
0.9.1-0 #
- Fix invalid usage of textureLod on desktop platforms.
0.9.2-0 #
- Fix globalTransform calculation.
0.11.1 #
- Fixed the
Node.globalTransformsetter scaling by the parent's determinant instead of composing with its inverse.
0.11.0 #
- Added a runtime GLB importer,
Node.fromGlbBytesandNode.fromGlbAsset. (#12) - Bumped
flutter_scene_importerto^0.11.0(pure Dart, no CMake).
0.10.0 #
- Migrated from the discontinued
native_assets_clitohooks1.0; build hooks now importpackage:hooks/hooks.dart. (#82) - Dropped the obsolete
--enable-experiment=native-assetsflag that broke builds on Dart 3.10+. (#82) - Reorganized the repository as a pub workspace. (#36)
- Updated
flutter_gpu_shadersto^0.4.0.
