fix(flame_3d): Use float for numLights uniform to fix GLES crash#3810
Open
agnath18K wants to merge 1 commit intoflame-engine:mainfrom
Open
fix(flame_3d): Use float for numLights uniform to fix GLES crash#3810agnath18K wants to merge 1 commit intoflame-engine:mainfrom
agnath18K wants to merge 1 commit intoflame-engine:mainfrom
Conversation
Contributor
|
We should verify if this still works on iOS/macos I don't mind changing it to an float, but if I recall we had weird float issues on the other platforms 😭 |
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.
Description
Fixes #3809
flame_3dcrashes on Android GLES becausespatial_material.fragdeclaresuint numLightsandlighting_info.dartsets it viashader.setUint(). Impeller's GLES backend only supportsfloatuniforms — theuintpath hits an unhandled shader type and crashes.Changed
uint→floatin the shader andsetUint→setFloatin Dart. The value is a light count (0–3) sofloatworks identically. Recompiled the shaderbundle.Checklist
docsand added dartdoc comments with///.examplesordocs.No test added — the crash only reproduces on a real GLES device/emulator, not in unit tests. The existing lighting logic is unchanged; only the uniform type is corrected.
Breaking Change?