Skip to content

feat: @typegpu/sdf package #1428

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

Merged
merged 28 commits into from
Jul 4, 2025
Merged

feat: @typegpu/sdf package #1428

merged 28 commits into from
Jul 4, 2025

Conversation

iwoplaza
Copy link
Collaborator

No description provided.

Copy link

github-actions bot commented Jun 29, 2025

pkg.pr.new

packages

pnpm i https://pkg.pr.new/software-mansion/TypeGPU/typegpu@1428
pnpm i https://pkg.pr.new/software-mansion/TypeGPU/typegpu@17a01b6abf6fcc3cb46f420044d0088abc9f3f51

benchmark
view benchmark

commit
view commit

@iwoplaza iwoplaza changed the title Feat/typegpu-sdf feat: @typegpu/sdf package Jun 30, 2025
@iwoplaza iwoplaza marked this pull request as ready for review June 30, 2025 18:59
@iwoplaza iwoplaza requested review from deluksic, aleksanderkatan and reczkok and removed request for deluksic June 30, 2025 18:59
@iwoplaza iwoplaza requested a review from reczkok July 3, 2025 15:47
@iwoplaza iwoplaza requested a review from reczkok July 4, 2025 10:37
Copy link
Contributor

@reczkok reczkok left a comment

Choose a reason for hiding this comment

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

Great work!

const resolution = root.createUniform(d.vec2f);

const MAX_STEPS = 1000;
const MAX_DIST = 500;
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we can reduce it to something like 20 - anything beyond that is just aliased checkerboard. I also like the "small planet" appearance this gives along with performance benefits.

Version Visual Output Performance Logs
Before Before Visual Before Logs
After After Visual After Logs

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Nice! The spherical world effect messes with my head a bit though, since the checkerboard is not distorted to go around a spherical world. What if we added a fog instead?

Screen.Recording.2025-07-04.at.15.58.25.mov

Copy link
Contributor

Choose a reason for hiding this comment

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

if you're not aware of this masterpiece, highly recommend reading https://iquilezles.org/articles/checkerfiltering/

@iwoplaza iwoplaza merged commit ef26faf into main Jul 4, 2025
6 checks passed
@iwoplaza iwoplaza deleted the feat/typegpu-sdf branch July 4, 2025 16:10
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