Skip to content

Conversation

@reczkok
Copy link
Contributor

@reczkok reczkok commented Dec 3, 2025

It's pretty - next step is to use it to create an outline around a 3d object in a scene 😉

thumbnail

@reczkok reczkok marked this pull request as ready for review December 3, 2025 15:29
@github-actions
Copy link

github-actions bot commented Dec 3, 2025

pkg.pr.new

packages
Ready to be installed by your favorite package manager ⬇️

https://pkg.pr.new/software-mansion/TypeGPU/typegpu@0b455539419873de12f504128c449c81dfbf27c4
https://pkg.pr.new/software-mansion/TypeGPU/@typegpu/noise@0b455539419873de12f504128c449c81dfbf27c4
https://pkg.pr.new/software-mansion/TypeGPU/unplugin-typegpu@0b455539419873de12f504128c449c81dfbf27c4

benchmark
view benchmark

commit
view commit

Copilot finished reviewing on behalf of reczkok December 3, 2025 15:31
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a new example demonstrating the Jump Flood Algorithm, a GPU-accelerated algorithm for computing Voronoi diagrams. The example showcases compute shaders with ping-pong buffers and animated step visualization, serving as an educational resource for GPU algorithm implementations.

Key changes:

  • Adds a complete Jump Flood Algorithm example with interactive controls for seed density, step delay, and range
  • Updates numeric.ts to use type-only import for Snippet, aligning with codebase conventions
  • Includes comprehensive test coverage with shader code validation

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
apps/typegpu-docs/src/examples/algorithms/jump-flood/index.ts Main implementation with initialization, flood computation, and rendering pipelines
apps/typegpu-docs/src/examples/algorithms/jump-flood/meta.json Example metadata defining title, category, and tags
apps/typegpu-docs/src/examples/algorithms/jump-flood/index.html Minimal HTML template with canvas element
packages/typegpu/tests/examples/individual/jump-flood.test.ts Test suite validating shader code generation with snapshot testing
packages/typegpu/src/std/numeric.ts Import statement updated to use type-only import for Snippet

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

@aleksanderkatan aleksanderkatan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great example! 🥐🍦

Comment on lines 295 to 298
initial: 0.1,
min: 0.001,
max: 5,
step: 0.001,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we could do this a select? It's really difficult to select values smaller than 0.1, and those are interesting as well

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But it will be just as hard if we just do 2 of them - how many would you like?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will add a non-linear mapping so we get more precision at the lower ends
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants