-
-
Notifications
You must be signed in to change notification settings - Fork 914
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
feat: Refactor shader uniform binding to support shader arrays [flame_3d] #3282
Conversation
03f390e
to
78511f2
Compare
df7a0f1
to
75e64a7
Compare
aebbdb2
to
8158d30
Compare
@@ -13,7 +13,7 @@ class ResizingRectangle extends RectangleComponent { | |||
void onGameResize(Vector2 size) { | |||
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
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.
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
docs
and added dartdoc comments with///
.examples
ordocs
.Breaking Change?