feat: Refactor shader uniform binding to support shader arrays [flame_3d]#3282
Merged
luanpotter merged 2 commits intoflame_3dfrom Sep 21, 2024
Merged
feat: Refactor shader uniform binding to support shader arrays [flame_3d]#3282luanpotter merged 2 commits intoflame_3dfrom
luanpotter merged 2 commits intoflame_3dfrom
Conversation
03f390e to
78511f2
Compare
6 tasks
df7a0f1 to
75e64a7
Compare
aebbdb2 to
8158d30
Compare
luanpotter
commented
Sep 12, 2024
| super.onGameResize(size); | ||
|
|
||
| this.size = size * .4; | ||
| this.size = size * 0.4; |
luanpotter
commented
Sep 12, 2024
| _vertexShader.resource, | ||
| _fragmentShader.resource, | ||
| _vertexShader.compile().resource, | ||
| _fragmentShader.compile().resource, |
Member
Author
There was a problem hiding this comment.
I'm open to any other cleaner ways to make this testable
Member
|
Have you reported that it doesn't work in flutter_gpu? |
Member
Author
|
I've been talking with @bdero about it; he suggested using Either way, I believe the Flame-facing API should be independent of this (though I def want to completely overhaul it to be type safe, the current one is reliant on strings). |
luanpotter
added a commit
that referenced
this pull request
Sep 13, 2024
Support skeletal animation basics. Sadly we cannot support arrays yet - see [this PR](#3282).
8158d30 to
9132ee8
Compare
1 task
luanpotter
added a commit
that referenced
this pull request
Oct 15, 2024
Support skeletal animation basics. Sadly we cannot support arrays yet - see [this PR](#3282).
luanpotter
added a commit
that referenced
this pull request
Oct 15, 2024
…_3d] (#3282) Refactor shader uniform binding to support shader arrays. This also decouples the whole shader and uniform byte handling code (that we should definitely test) from the flutter_gpu primitives that are impossible to mock (base native classes). This adds tests that ensure the arrays are bound as they should - however the underlying flutter_gpu code does not seem to work. See [this PR](#3284) for a test of using this to support an arbitrary number of lights. Either way, we can merge this as is as this refactors the underlying structure to support arrays when ready, and make it more testable as well.
luanpotter
added a commit
that referenced
this pull request
Dec 11, 2024
Support skeletal animation basics. Sadly we cannot support arrays yet - see [this PR](#3282).
luanpotter
added a commit
that referenced
this pull request
Dec 11, 2024
…_3d] (#3282) Refactor shader uniform binding to support shader arrays. This also decouples the whole shader and uniform byte handling code (that we should definitely test) from the flutter_gpu primitives that are impossible to mock (base native classes). This adds tests that ensure the arrays are bound as they should - however the underlying flutter_gpu code does not seem to work. See [this PR](#3284) for a test of using this to support an arbitrary number of lights. Either way, we can merge this as is as this refactors the underlying structure to support arrays when ready, and make it more testable as well.
luanpotter
added a commit
that referenced
this pull request
Dec 11, 2024
Support skeletal animation basics. Sadly we cannot support arrays yet - see [this PR](#3282).
luanpotter
added a commit
that referenced
this pull request
Dec 11, 2024
…_3d] (#3282) Refactor shader uniform binding to support shader arrays. This also decouples the whole shader and uniform byte handling code (that we should definitely test) from the flutter_gpu primitives that are impossible to mock (base native classes). This adds tests that ensure the arrays are bound as they should - however the underlying flutter_gpu code does not seem to work. See [this PR](#3284) for a test of using this to support an arbitrary number of lights. Either way, we can merge this as is as this refactors the underlying structure to support arrays when ready, and make it more testable as well.
nickf2k
pushed a commit
to nickf2k/flame
that referenced
this pull request
Nov 16, 2025
Support skeletal animation basics. Sadly we cannot support arrays yet - see [this PR](flame-engine#3282).
nickf2k
pushed a commit
to nickf2k/flame
that referenced
this pull request
Nov 16, 2025
…_3d] (flame-engine#3282) Refactor shader uniform binding to support shader arrays. This also decouples the whole shader and uniform byte handling code (that we should definitely test) from the flutter_gpu primitives that are impossible to mock (base native classes). This adds tests that ensure the arrays are bound as they should - however the underlying flutter_gpu code does not seem to work. See [this PR](flame-engine#3284) for a test of using this to support an arbitrary number of lights. Either way, we can merge this as is as this refactors the underlying structure to support arrays when ready, and make it more testable as well.
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
Refactor shader uniform binding to support shader arrays.
This also decouples the whole shader and uniform byte handling code (that we should definitely test) from the flutter_gpu primitives that are impossible to mock (base native classes).
This adds tests that ensure the arrays are bound as they should - however the underlying flutter_gpu code does not seem to work. See this PR for a test of using this to support an arbitrary number of lights.
Either way, we can merge this as is as this refactors the underlying structure to support arrays when ready, and make it more testable as well.
Checklist
docsand added dartdoc comments with///.examplesordocs.Breaking Change?