-
-
Notifications
You must be signed in to change notification settings - Fork 1k
feat: Refactor shader uniform binding to support shader arrays [flame_3d] #3282
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
03f390e to
78511f2
Compare
df7a0f1 to
75e64a7
Compare
aebbdb2 to
8158d30
Compare
| super.onGameResize(size); | ||
|
|
||
| this.size = size * .4; | ||
| this.size = size * 0.4; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unrelated DCM
| _vertexShader.resource, | ||
| _fragmentShader.resource, | ||
| _vertexShader.compile().resource, | ||
| _fragmentShader.compile().resource, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm open to any other cleaner ways to make this testable
|
Have you reported that it doesn't work in flutter_gpu? |
|
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). |
Support skeletal animation basics. Sadly we cannot support arrays yet - see [this PR](#3282).
8158d30 to
9132ee8
Compare
spydon
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm!
Support skeletal animation basics. Sadly we cannot support arrays yet - see [this PR](#3282).
…_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.
Support skeletal animation basics. Sadly we cannot support arrays yet - see [this PR](#3282).
…_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.
Support skeletal animation basics. Sadly we cannot support arrays yet - see [this PR](#3282).
…_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.
Support skeletal animation basics. Sadly we cannot support arrays yet - see [this PR](flame-engine#3282).
…_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.
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?