shu223 / Metal-SDF-Examples

Shape Animation Examples using SDF with MSL (Metal Shader Language)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Metal SDF Examples

Platform Language License Twitter

Shape Animation Examples using SDF. Shaders are written in MSL (Metal Shader Language) with SwiftUI.

What's this?

本リポジトリは、書籍「リアルタイムグラフィックスの数学 - GLSLではじめるシェーダプログラミング | 巴山 竜来」の GLSLサンプル を MSL (Metal Shader Language) で写経したものです。

主に第II部「距離が作りし世界」のSDF関連のサンプルを扱っています。

学習のため、最小限の構成にしたサンプルや、3Dだったものを2Dにしたサンプルを追加したりもしています。

Contents

Book examples

  • 8_1_texMapping
  • 8_2_lighting
  • 8_6_sphere
  • 8_7_rotSphere
  • 9_2_morphing
  • 9_3_smoothMin
  • 9_4_solidTexturing

  • 9_5_displacement

  • 9_6_repeat

  • 9_7_octahedron

  • 9_10_norm

Custom examples

  • Circle SDF
  • Union of SDFs
  • 2D Morphing
  • 2D Smooth Min

About

Shape Animation Examples using SDF with MSL (Metal Shader Language)

License:MIT License


Languages

Language:Metal 85.5%Language:Swift 10.0%Language:C 3.5%Language:C++ 1.0%