-
-
Notifications
You must be signed in to change notification settings - Fork 932
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: Fragment shaders pipelines and Camera based post processing #3404
base: main
Are you sure you want to change the base?
Conversation
@@ -0,0 +1,21 @@ | |||
name: crystal_ball | |||
description: "A game to showcase the shader pipeline API in Flutter." |
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.
Flame?
Co-authored-by: Luan Nico <[email protected]>
|
||
|
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.
remove
} | ||
} | ||
|
||
class SamplingCanvas<S extends SPipelineStep> implements Canvas { |
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.
could consider some sort of "context" api - but we can have this version as is as a first one
final int samplingPasses; | ||
|
||
|
||
|
||
|
||
late final _layer = _SPipelineStepLayer( | ||
renderTree: super.renderTree, | ||
canvasFactory: _canvasFactory, | ||
samplingPasses: samplingPasses, | ||
postProcess: postProcess, | ||
); | ||
|
||
|
||
|
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.
formatting
uniform float[18] glowGamas; | ||
|
||
|
||
//uniform sampler2D tTexture; |
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.
not used?
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.
Overall looks very nice! 🤩
const (double, double) kCameraSize = (900, 1600); | ||
|
||
void main() async { | ||
runApp(const GamePage()); |
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.
We should add this example to the examples page too :)
void postProcess(List<ui.Image> samples, Size size, Canvas canvas); | ||
} | ||
|
||
class PostProcessorComponent extends PositionComponent { |
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.
Some dartdocs of this public API would be good
} | ||
} | ||
|
||
class SamplingCanvas<S extends PostProcessor> implements Canvas { |
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.
Maybe T
instead, since it isn't yet used?
Description
Replace this text.
Checklist
docs
and added dartdoc comments with///
.examples
ordocs
.Breaking Change?
Related Issues