Load .fmat materials at runtime in the editor and package distributable builds - #302
Open
bdero wants to merge 2 commits into
Open
Load .fmat materials at runtime in the editor and package distributable builds#302bdero wants to merge 2 commits into
bdero wants to merge 2 commits into
Conversation
… compiles The editor now compiles a referenced .fmat source on demand with the SDK's impellerc, loads the bundle through ShaderLibrary.fromBytes, and watches the source (plus its GLSL includes) to refresh the live shaders in place on edit, keeping the last good shaders when a compile fails. Adds bytes-based shader library loading to all three GPU shim backends, an FmatRuntimeCompiler with a content-keyed disk cache, an FmatBytesLibrary that refreshes live materials and skies in place, fmat loader hooks on the realizer and stage realize, a sidecar-driven fmat parameter inspector, a Shader (.fmat) sky picker, and .fmat as an asset browser kind.
Adds tool/package_editor.dart, which builds the editor per platform and installs impellerc, its shader_lib, flutter_scene's framework GLSL, and a tool_manifest.json into the bundle, then produces a DMG (macOS, with optional signing/notarization), tar.gz (Linux), or zip (Windows). The fmat toolchain locator resolves the packaged layout first and reports its provenance through a Shader Toolchain dialog in the View menu. macOS packages a release build (Info.plist enables Impeller + Flutter GPU); Linux and Windows package profile builds behind a launcher that sets the engine switches, since release builds compile out the environment switch path. A tag-triggered workflow builds all three against the flutter/flutter revision pinned in flutter.version and attaches the archives to a GitHub release.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The editor now compiles referenced
.fmatsources on demand with the SDK's impellerc, loads them throughShaderLibrary.fromBytes, and watches each source (plus its GLSL includes) to hot swap the compiled shaders in place as they are edited, with a sidecar-driven parameter inspector, a Shader (.fmat) sky type, and.fmatassets in the browser. Also adds distributable editor packaging, a per-platform script that bundles impellerc, its shader_lib, and the framework shaders into the app (DMG/tar.gz/zip), bundled-toolchain resolution with a diagnostics dialog, and a tag-triggered workflow that builds macOS, Linux, and Windows at a pinned Flutter revision.