1
0
mirror of https://github.com/flutter/samples.git synced 2026-04-27 09:58:50 +00:00

Add new sample simple_sdf (#2835)

Add a new sample, `simple_sdf`. This is similar to `simple_shader`, but
it focuses on using Signed Distance Functions within the fragment
shader.

Relates to issue
[#183043](https://github.com/flutter/flutter/issues/183043)

## Pre-launch Checklist

- [x] I read the [Flutter Style Guide] _recently_, and have followed its
advice.
- [x] I signed the [CLA].
- [x] I read the [Contributors Guide].
- [ ] I have added sample code updates to the [changelog].
- [x] I updated/added relevant documentation (doc comments with `///`).


If you need help, consider asking for advice on the #hackers-devrel
channel on [Discord].

<!-- Links -->
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/master/docs/contributing/Style-guide-for-Flutter-repo.md
[CLA]: https://cla.developers.google.com/
[Discord]:
https://github.com/flutter/flutter/blob/master/docs/contributing/Chat.md
[Contributors Guide]:
https://github.com/flutter/samples/blob/main/CONTRIBUTING.md
[changelog]: ../CHANGELOG.md
This commit is contained in:
Andy Wolff
2026-04-23 09:42:27 -07:00
committed by GitHub
parent c28ef8766d
commit a7be276f22
11 changed files with 216 additions and 0 deletions

9
simple_sdf/README.md Normal file
View File

@@ -0,0 +1,9 @@
# `simple_sdf`
A simple [Flutter fragment shaders][] sample project showing how to draw Signed Distance Functions with the FragmentShader API.
Use `flutter create --no-overwrite .` to initialize the project.
[Flutter fragment shaders]: https://docs.flutter.dev/development/ui/advanced/shaders
![Screenshot of the `simple_sdf` app](screenshot.png)