{"id":18772407,"url":"https://github.com/shu223/metal-sdf-examples","last_synced_at":"2025-04-12T16:43:40.609Z","repository":{"id":228879268,"uuid":"775147574","full_name":"shu223/Metal-SDF-Examples","owner":"shu223","description":"Shape Animation Examples using SDF with MSL (Metal Shader Language)","archived":false,"fork":false,"pushed_at":"2024-06-04T06:33:00.000Z","size":6827,"stargazers_count":68,"open_issues_count":0,"forks_count":4,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-26T11:11:09.347Z","etag":null,"topics":["ios","macos","metal","metal-shader","msl","sdf","sdf-2d","swift","swiftui","visionos","watchos"],"latest_commit_sha":null,"homepage":"","language":"Metal","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shu223.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-03-20T21:05:35.000Z","updated_at":"2025-03-19T09:47:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"4b92fd8f-a708-4b73-9205-a22ba3dbb5be","html_url":"https://github.com/shu223/Metal-SDF-Examples","commit_stats":null,"previous_names":["shu223/metal-sdf-examples"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shu223%2FMetal-SDF-Examples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shu223%2FMetal-SDF-Examples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shu223%2FMetal-SDF-Examples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shu223%2FMetal-SDF-Examples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shu223","download_url":"https://codeload.github.com/shu223/Metal-SDF-Examples/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248599746,"owners_count":21131352,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ios","macos","metal","metal-shader","msl","sdf","sdf-2d","swift","swiftui","visionos","watchos"],"created_at":"2024-11-07T19:28:54.978Z","updated_at":"2025-04-12T16:43:40.583Z","avatar_url":"https://github.com/shu223.png","language":"Metal","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Metal SDF Examples\n\n[![Platform](http://img.shields.io/badge/platform-ios-blue.svg?style=flat\n)](https://developer.apple.com/iphone/index.action)\n[![Language](http://img.shields.io/badge/language-swift-brightgreen.svg?style=flat\n)](https://developer.apple.com/swift)\n[![License](http://img.shields.io/badge/license-MIT-lightgrey.svg?style=flat\n)](http://mit-license.org)\n[![Twitter](https://img.shields.io/badge/twitter-@shu223-blue.svg?style=flat)](http://twitter.com/shu223)\n\nShape Animation Examples using SDF. Shaders are written in MSL (Metal Shader Language) with SwiftUI.\n\n![](images/MetalSDF_.gif)\n\n## What's this?\n\n本リポジトリは、書籍「[リアルタイムグラフィックスの数学 - GLSLではじめるシェーダプログラミング | 巴山 竜来](https://amzn.to/43tnJy7)」の [GLSLサンプル](https://github.com/yutannihilation/math_of_realtime_graphics_wgsl_version) を MSL (Metal Shader Language) で写経したものです。\n\n主に第II部「距離が作りし世界」のSDF関連のサンプルを扱っています。\n\n学習のため、最小限の構成にしたサンプルや、3Dだったものを2Dにしたサンプルを追加したりもしています。\n\n## Contents\n\n### Book examples\n\n- 8_1_texMapping\n- 8_2_lighting\n- 8_6_sphere\n- 8_7_rotSphere\n- 9_2_morphing\n- 9_3_smoothMin\n- 9_4_solidTexturing\n\n![](images/9_4_solidTexturing.gif)\n\n- 9_5_displacement\n\n![](images/9_5.gif)\n\n- 9_6_repeat\n\n![](images/9_6_repeat_.gif)\n\n- 9_7_octahedron\n\n![](images/9_7.gif)\n\n- 9_8_truncation\n\n![](images/9_8.gif)\n\n- 9_9_dist\n\n![](images/9_9.gif)\n\n- 9_10_norm\n\n![](images/9_10_norm_.gif)\n\n\n### Custom examples\n\n- Circle SDF\n- Union of SDFs\n- 2D Morphing\n- 2D Smooth Min\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshu223%2Fmetal-sdf-examples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshu223%2Fmetal-sdf-examples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshu223%2Fmetal-sdf-examples/lists"}