├── README.md
├── MeshFrame
├── MeshFrame
│ ├── sjy.bin
│ ├── Assets.xcassets
│ │ ├── Contents.json
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── AppDelegate.h
│ ├── main.m
│ ├── ViewController.h
│ ├── Metal
│ │ ├── MetalView
│ │ │ └── MetalView.h
│ │ ├── MetalContext
│ │ │ ├── MetalContext.h
│ │ │ └── MetalContext.mm
│ │ └── MetalRenderer
│ │ │ └── FrameRenderer
│ │ │ └── FrameRenderer.h
│ ├── Utility
│ │ └── Math
│ │ │ ├── OrbitControl.hpp
│ │ │ └── MathUtilities.hpp
│ ├── Info.plist
│ └── Base.lproj
│ │ ├── Main.storyboard
│ │ └── LaunchScreen.storyboard
└── MeshFrame.xcodeproj
│ └── project.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ └── IDEWorkspaceChecks.plist
├── MetalCube
├── MetalCube
│ ├── Assets.xcassets
│ │ ├── Contents.json
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── AppDelegate.h
│ ├── ViewController.h
│ ├── main.m
│ ├── Metal
│ │ ├── MetalView
│ │ │ └── MetalView.h
│ │ ├── MetalContext
│ │ │ ├── MetalContext.h
│ │ │ └── MetalContext.mm
│ │ └── MetalRenderer
│ │ │ └── MeshRenderer
│ │ │ ├── MeshRenderer.h
│ │ │ └── mesh.metal
│ ├── Utility
│ │ └── Math
│ │ │ ├── OrbitControl.hpp
│ │ │ └── MathUtilities.hpp
│ ├── Info.plist
│ └── Base.lproj
│ │ ├── Main.storyboard
│ │ └── LaunchScreen.storyboard
└── MetalCube.xcodeproj
│ └── project.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ └── IDEWorkspaceChecks.plist
├── MetalLine
├── MetalLine
│ ├── Assets.xcassets
│ │ ├── Contents.json
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── AppDelegate.h
│ ├── ViewController.h
│ ├── main.m
│ ├── Metal
│ │ ├── MetalView
│ │ │ └── MetalView.h
│ │ ├── MetalContext
│ │ │ ├── MetalContext.h
│ │ │ └── MetalContext.mm
│ │ └── MetalRenderer
│ │ │ └── LineRenderer
│ │ │ └── LineRenderer.h
│ ├── ViewController.m
│ ├── Info.plist
│ └── Base.lproj
│ │ ├── Main.storyboard
│ │ └── LaunchScreen.storyboard
└── MetalLine.xcodeproj
│ └── project.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ └── IDEWorkspaceChecks.plist
├── MetalPoint
├── MetalPoint
│ ├── Assets.xcassets
│ │ ├── Contents.json
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── AppDelegate.h
│ ├── ViewController.h
│ ├── main.m
│ ├── Metal
│ │ ├── MetalView
│ │ │ └── MetalView.h
│ │ ├── MetalContext
│ │ │ ├── MetalContext.h
│ │ │ └── MetalContext.mm
│ │ └── MetalRenderer
│ │ │ └── PointRenderer
│ │ │ ├── PointRenderer.h
│ │ │ └── point.metal
│ ├── ViewController.m
│ ├── Info.plist
│ └── Base.lproj
│ │ ├── Main.storyboard
│ │ └── LaunchScreen.storyboard
└── MetalPoint.xcodeproj
│ └── project.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ └── IDEWorkspaceChecks.plist
├── GaussianBlurMPS
├── GaussianBlurMPS
│ ├── Assets.xcassets
│ │ ├── Contents.json
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── ViewController.h
│ ├── AppDelegate.h
│ ├── main.m
│ ├── Metal
│ │ ├── MetalView
│ │ │ └── MetalView.h
│ │ ├── MetalContext
│ │ │ ├── MetalContext.h
│ │ │ └── MetalContext.mm
│ │ ├── MetalRenderer
│ │ │ └── VideoGaussianRenderer
│ │ │ │ └── VideoGaussianRenderer.h
│ │ └── MetalEncoder
│ │ │ ├── GaussianBlurEncoder
│ │ │ ├── GaussianBlurEncoder.h
│ │ │ └── GaussianBlurEncoder.m
│ │ │ └── TextureRendererEncoder
│ │ │ ├── TextureRendererEncoder.h
│ │ │ └── TextureRendererEncoder.metal
│ ├── Utility
│ │ ├── Device
│ │ │ └── FrontCamera.h
│ │ └── Math
│ │ │ ├── OrbitControl.hpp
│ │ │ └── MathUtilities.hpp
│ ├── Base.lproj
│ │ ├── Main.storyboard
│ │ └── LaunchScreen.storyboard
│ └── Info.plist
└── GaussianBlurMPS.xcodeproj
│ └── project.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ └── IDEWorkspaceChecks.plist
├── TextureRenderer
├── TextureRenderer
│ ├── Assets.xcassets
│ │ └── Contents.json
│ ├── ViewController.h
│ ├── AppDelegate.h
│ ├── main.m
│ ├── Metal
│ │ ├── MetalView
│ │ │ └── MetalView.h
│ │ ├── MetalContext
│ │ │ ├── MetalContext.h
│ │ │ └── MetalContext.mm
│ │ └── MetalRenderer
│ │ │ └── TextureRenderer
│ │ │ ├── TextureRenderer.h
│ │ │ └── TextureRenderer.metal
│ ├── Utility
│ │ ├── Device
│ │ │ └── FrontCamera.h
│ │ └── Math
│ │ │ ├── OrbitControl.hpp
│ │ │ └── MathUtilities.hpp
│ ├── Base.lproj
│ │ ├── Main.storyboard
│ │ └── LaunchScreen.storyboard
│ └── Info.plist
└── TextureRenderer.xcodeproj
│ └── project.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ └── IDEWorkspaceChecks.plist
├── others
├── MetalPoint
│ ├── MetalPoint
│ │ ├── Assets.xcassets
│ │ │ ├── Contents.json
│ │ │ └── AppIcon.appiconset
│ │ │ │ └── Contents.json
│ │ ├── ViewController.h
│ │ ├── AppDelegate.h
│ │ ├── main.m
│ │ ├── Metal
│ │ │ ├── MetalView
│ │ │ │ └── MetalView.h
│ │ │ ├── MetalContext
│ │ │ │ ├── MetalContext.h
│ │ │ │ └── MetalContext.mm
│ │ │ ├── MetalRenderer
│ │ │ │ └── PointRenderer
│ │ │ │ │ └── PointRenderer.h
│ │ │ └── MetalEncoder
│ │ │ │ └── PointRenderEncoder
│ │ │ │ ├── PointRendererEncoder.h
│ │ │ │ └── PointRendererEncoder.metal
│ │ ├── Info.plist
│ │ └── Base.lproj
│ │ │ ├── Main.storyboard
│ │ │ └── LaunchScreen.storyboard
│ └── MetalPoint.xcodeproj
│ │ └── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
└── MeshFrameGlowing
│ ├── MeshFrameGlowing
│ ├── Assets.xcassets
│ │ └── Contents.json
│ ├── sjy.bin
│ ├── ViewController.h
│ ├── AppDelegate.h
│ ├── main.m
│ ├── Metal
│ │ ├── MetalView
│ │ │ └── MetalView.h
│ │ ├── MetalContext
│ │ │ ├── MetalContext.h
│ │ │ └── MetalContext.mm
│ │ ├── MetalEncoder
│ │ │ ├── GaussianBlurEncoder
│ │ │ │ ├── GaussianBlurEncoder.h
│ │ │ │ └── GaussianBlurEncoder.m
│ │ │ ├── ImageBlenderEncoder
│ │ │ │ ├── ImageBlenderEncoder.h
│ │ │ │ └── ImageBlenderEncoder.metal
│ │ │ ├── TextureRendererEncoder
│ │ │ │ ├── TextureRendererEncoder.h
│ │ │ │ └── TextureRendererEncoder.metal
│ │ │ ├── MeshDepthMaskEncoder
│ │ │ │ ├── MeshDepthMaskEncoder.metal
│ │ │ │ └── MeshDepthMaskEncoder.h
│ │ │ └── LineRendererEncoder
│ │ │ │ └── LineRendererEncoder.h
│ │ └── MetalRenderer
│ │ │ ├── FrameGlowingRenderer
│ │ │ └── FrameGlowingRenderer.h
│ │ │ └── FrameTestRenderer
│ │ │ └── FrameTestRenderer.h
│ ├── Utility
│ │ └── Math
│ │ │ ├── OrbitControl.hpp
│ │ │ └── MathUtilities.hpp
│ ├── Info.plist
│ └── Base.lproj
│ │ ├── Main.storyboard
│ │ └── LaunchScreen.storyboard
│ └── MeshFrameGlowing.xcodeproj
│ └── project.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ └── IDEWorkspaceChecks.plist
├── MetalLinePrimitive
├── MetalLinePrimitive
│ ├── Assets.xcassets
│ │ └── Contents.json
│ ├── AppDelegate.h
│ ├── ViewController.h
│ ├── main.m
│ ├── Metal
│ │ ├── MetalView
│ │ │ └── MetalView.h
│ │ ├── MetalContext
│ │ │ ├── MetalContext.h
│ │ │ └── MetalContext.mm
│ │ └── MetalRenderer
│ │ │ └── LineRenderer
│ │ │ ├── LineRenderer.h
│ │ │ └── line.metal
│ ├── ViewController.m
│ ├── Info.plist
│ └── Base.lproj
│ │ ├── Main.storyboard
│ │ └── LaunchScreen.storyboard
└── MetalLinePrimitive.xcodeproj
│ └── project.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ └── IDEWorkspaceChecks.plist
├── OffScreenRendering
├── OffScreenRendering
│ ├── Assets.xcassets
│ │ └── Contents.json
│ ├── ViewController.h
│ ├── AppDelegate.h
│ ├── main.m
│ ├── Metal
│ │ ├── MetalView
│ │ │ └── MetalView.h
│ │ ├── MetalContext
│ │ │ ├── MetalContext.h
│ │ │ └── MetalContext.mm
│ │ ├── MetalEncoder
│ │ │ ├── TextureRendererEncoder
│ │ │ │ ├── TextureRendererEncoder.h
│ │ │ │ └── TextureRendererEncoder.metal
│ │ │ └── FrameRendererEncoder
│ │ │ │ └── FrameRendererEncoder.h
│ │ └── MetalRenderer
│ │ │ └── FrameRenderer
│ │ │ └── FrameRenderer.h
│ ├── Utility
│ │ └── Math
│ │ │ ├── OrbitControl.hpp
│ │ │ └── MathUtilities.hpp
│ ├── Info.plist
│ └── Base.lproj
│ │ ├── Main.storyboard
│ │ └── LaunchScreen.storyboard
└── OffScreenRendering.xcodeproj
│ └── project.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ └── IDEWorkspaceChecks.plist
├── TrueDepthStreaming
├── TrueDepthStreaming
│ ├── Assets.xcassets
│ │ └── Contents.json
│ ├── AppDelegate.h
│ ├── main.m
│ ├── ViewController.h
│ ├── Metal
│ │ ├── MetalRenderer
│ │ │ ├── VideoRenderer
│ │ │ │ ├── VideoRenderer.h
│ │ │ │ └── VideoRenderer.m
│ │ │ └── DepthRenderer
│ │ │ │ └── DepthRenderer.h
│ │ ├── MetalView
│ │ │ └── MetalView.h
│ │ ├── MetalContext
│ │ │ └── MetalContext.h
│ │ └── MetalEncoder
│ │ │ ├── DisparityToTextureEncoder
│ │ │ ├── DisparityToTextureEncoder.h
│ │ │ └── DisparityToTextureEncoder.metal
│ │ │ └── TextureRendererEncoder
│ │ │ ├── TextureRendererEncoder.h
│ │ │ └── TextureRendererEncoder.metal
│ ├── Utility
│ │ ├── Device
│ │ │ └── FrontCamera.h
│ │ └── Math
│ │ │ ├── OrbitControl.hpp
│ │ │ └── MathUtilities.hpp
│ ├── Info.plist
│ └── Base.lproj
│ │ └── LaunchScreen.storyboard
└── TrueDepthStreaming.xcodeproj
│ └── project.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ └── IDEWorkspaceChecks.plist
├── HelloMetal
├── HelloMetal.xcodeproj
│ └── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
└── HelloMetal
│ ├── AppDelegate.h
│ ├── ViewController.h
│ ├── main.m
│ ├── Metal
│ ├── MetalView
│ │ └── MetalView.h
│ ├── MetalContext
│ │ ├── MetalContext.h
│ │ └── MetalContext.mm
│ └── MetalRenderer
│ │ ├── LineRenderer
│ │ ├── LineRenderer.h
│ │ └── line.metal
│ │ └── TriangleRenderer
│ │ ├── TriangleRenderer.h
│ │ └── triangle.metal
│ ├── ViewController.m
│ ├── Info.plist
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ └── Assets.xcassets
│ └── AppIcon.appiconset
│ └── Contents.json
└── .gitignore
/README.md:
--------------------------------------------------------------------------------
1 | # Learn-Metal
2 | Learn-Metal
3 |
4 | # Basic Metal
5 | Search Metal by Example
6 |
--------------------------------------------------------------------------------
/MeshFrame/MeshFrame/sjy.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjy234sjy234/Learn-Metal/HEAD/MeshFrame/MeshFrame/sjy.bin
--------------------------------------------------------------------------------
/MeshFrame/MeshFrame/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/MetalCube/MetalCube/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/MetalLine/MetalLine/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/MetalPoint/MetalPoint/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/GaussianBlurMPS/GaussianBlurMPS/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/TextureRenderer/TextureRenderer/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/others/MetalPoint/MetalPoint/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/MetalLinePrimitive/MetalLinePrimitive/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/OffScreenRendering/OffScreenRendering/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/TrueDepthStreaming/TrueDepthStreaming/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/others/MeshFrameGlowing/MeshFrameGlowing/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/others/MeshFrameGlowing/MeshFrameGlowing/sjy.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sjy234sjy234/Learn-Metal/HEAD/others/MeshFrameGlowing/MeshFrameGlowing/sjy.bin
--------------------------------------------------------------------------------
/MeshFrame/MeshFrame.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/MetalCube/MetalCube.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/MetalLine/MetalLine.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/HelloMetal/HelloMetal.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/MetalPoint/MetalPoint.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/others/MetalPoint/MetalPoint.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/GaussianBlurMPS/GaussianBlurMPS.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/TextureRenderer/TextureRenderer.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/MetalLinePrimitive/MetalLinePrimitive.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/OffScreenRendering/OffScreenRendering.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/TrueDepthStreaming/TrueDepthStreaming.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/others/MeshFrameGlowing/MeshFrameGlowing.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/TextureRenderer/TextureRenderer/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // TextureRenderer
4 | //
5 | // Created by 沈江洋 on 2018/9/3.
6 | // Copyright © 2018 沈江洋. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/others/MetalPoint/MetalPoint/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // MetalPoint
4 | //
5 | // Created by 沈江洋 on 2018/9/8.
6 | // Copyright © 2018 沈江洋. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 |
12 | @interface ViewController : UIViewController
13 |
14 |
15 | @end
16 |
17 |
--------------------------------------------------------------------------------
/MeshFrame/MeshFrame.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/MetalCube/MetalCube.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/MetalLine/MetalLine.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/GaussianBlurMPS/GaussianBlurMPS/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // GaussianBlurMPS
4 | //
5 | // Created by 沈江洋 on 2018/9/5.
6 | // Copyright © 2018 沈江洋. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 |
12 | @interface ViewController : UIViewController
13 |
14 |
15 | @end
16 |
17 |
--------------------------------------------------------------------------------
/HelloMetal/HelloMetal.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/MetalPoint/MetalPoint.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/others/MetalPoint/MetalPoint.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/GaussianBlurMPS/GaussianBlurMPS.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/TextureRenderer/TextureRenderer.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/MetalLinePrimitive/MetalLinePrimitive.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/OffScreenRendering/OffScreenRendering.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/TrueDepthStreaming/TrueDepthStreaming.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/others/MeshFrameGlowing/MeshFrameGlowing.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/MeshFrame/MeshFrame/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // MeshFrame
4 | //
5 | // Created by 沈江洋 on 2018/8/29.
6 | // Copyright © 2018 沈江洋. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/MetalCube/MetalCube/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // MetalCube
4 | //
5 | // Created by 沈江洋 on 2018/8/27.
6 | // Copyright © 2018 沈江洋. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/MetalLine/MetalLine/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // MetalLine
4 | //
5 | // Created by 沈江洋 on 2018/8/17.
6 | // Copyright © 2018 沈江洋. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/HelloMetal/HelloMetal/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // HelloMetal
4 | //
5 | // Created by 沈江洋 on 27/12/2017.
6 | // Copyright © 2017 沈江洋. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/MetalPoint/MetalPoint/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // MetalPoint
4 | //
5 | // Created by 沈江洋 on 2018/8/18.
6 | // Copyright © 2018 沈江洋. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/OffScreenRendering/OffScreenRendering/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // OffScreenRendering
4 | //
5 | // Created by 沈江洋 on 2018/9/5.
6 | // Copyright © 2018 沈江洋. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 | #import
12 |
13 | @interface ViewController : UIViewController
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/others/MetalPoint/MetalPoint/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // MetalPoint
4 | //
5 | // Created by 沈江洋 on 2018/9/8.
6 | // Copyright © 2018 沈江洋. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/GaussianBlurMPS/GaussianBlurMPS/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // GaussianBlurMPS
4 | //
5 | // Created by 沈江洋 on 2018/9/5.
6 | // Copyright © 2018 沈江洋. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/TextureRenderer/TextureRenderer/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // TextureRenderer
4 | //
5 | // Created by 沈江洋 on 2018/9/3.
6 | // Copyright © 2018 沈江洋. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/others/MeshFrameGlowing/MeshFrameGlowing/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // MeshFrameGlowing
4 | //
5 | // Created by 沈江洋 on 2018/9/5.
6 | // Copyright © 2018 沈江洋. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 | #import
12 |
13 | @interface ViewController : UIViewController
14 |
15 |
16 | @end
17 |
18 |
19 |
--------------------------------------------------------------------------------
/MetalCube/MetalCube/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // MetalCube
4 | //
5 | // Created by 沈江洋 on 2018/8/27.
6 | // Copyright © 2018 沈江洋. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "MetalContext.h"
11 | #import "MetalView.h"
12 | #import "MeshRenderer.h"
13 |
14 | @interface ViewController : UIViewController
15 |
16 |
17 | @end
18 |
19 |
--------------------------------------------------------------------------------
/MetalLine/MetalLine/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // MetalPoint
4 | //
5 | // Created by 沈江洋 on 2018/8/18.
6 | // Copyright © 2018 沈江洋. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "MetalContext.h"
11 | #import "MetalView.h"
12 | #import "LineRenderer.h"
13 |
14 | @interface ViewController : UIViewController
15 |
16 |
17 | @end
18 |
19 |
--------------------------------------------------------------------------------
/MetalPoint/MetalPoint/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // MetalPoint
4 | //
5 | // Created by 沈江洋 on 2018/8/18.
6 | // Copyright © 2018 沈江洋. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "MetalContext.h"
11 | #import "MetalView.h"
12 | #import "PointRenderer.h"
13 |
14 | @interface ViewController : UIViewController
15 |
16 |
17 | @end
18 |
19 |
--------------------------------------------------------------------------------
/HelloMetal/HelloMetal/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // MetalPoint
4 | //
5 | // Created by 沈江洋 on 2018/8/18.
6 | // Copyright © 2018 沈江洋. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "MetalContext.h"
11 | #import "MetalView.h"
12 | #import "TriangleRenderer.h"
13 |
14 | @interface ViewController : UIViewController
15 |
16 |
17 | @end
18 |
19 |
--------------------------------------------------------------------------------
/MetalLinePrimitive/MetalLinePrimitive/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // MetalLinePrimitive
4 | //
5 | // Created by 沈江洋 on 2018/8/28.
6 | // Copyright © 2018 沈江洋. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/OffScreenRendering/OffScreenRendering/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // OffScreenRendering
4 | //
5 | // Created by 沈江洋 on 2018/9/5.
6 | // Copyright © 2018 沈江洋. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/TrueDepthStreaming/TrueDepthStreaming/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // TrueDepthStreaming
4 | //
5 | // Created by 沈江洋 on 2018/9/6.
6 | // Copyright © 2018 沈江洋. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/others/MeshFrameGlowing/MeshFrameGlowing/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // MeshFrameGlowing
4 | //
5 | // Created by 沈江洋 on 2018/9/5.
6 | // Copyright © 2018 沈江洋. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/MeshFrame/MeshFrame/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // MeshFrame
4 | //
5 | // Created by 沈江洋 on 2018/8/29.
6 | // Copyright © 2018 沈江洋. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/MetalCube/MetalCube/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // MetalCube
4 | //
5 | // Created by 沈江洋 on 2018/8/27.
6 | // Copyright © 2018 沈江洋. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/MetalLine/MetalLine/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // MetalLine
4 | //
5 | // Created by 沈江洋 on 2018/8/17.
6 | // Copyright © 2018 沈江洋. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/MetalLinePrimitive/MetalLinePrimitive/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // MetalLinePrimitive
4 | //
5 | // Created by 沈江洋 on 2018/8/28.
6 | // Copyright © 2018 沈江洋. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "MetalContext.h"
11 | #import "MetalView.h"
12 | #import "LineRenderer.h"
13 |
14 | @interface ViewController : UIViewController
15 |
16 |
17 | @end
18 |
19 |
--------------------------------------------------------------------------------
/HelloMetal/HelloMetal/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // HelloMetal
4 | //
5 | // Created by 沈江洋 on 27/12/2017.
6 | // Copyright © 2017 沈江洋. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/MetalPoint/MetalPoint/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // MetalPoint
4 | //
5 | // Created by 沈江洋 on 2018/8/18.
6 | // Copyright © 2018 沈江洋. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/others/MetalPoint/MetalPoint/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // MetalPoint
4 | //
5 | // Created by 沈江洋 on 2018/9/8.
6 | // Copyright © 2018 沈江洋. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/GaussianBlurMPS/GaussianBlurMPS/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // GaussianBlurMPS
4 | //
5 | // Created by 沈江洋 on 2018/9/5.
6 | // Copyright © 2018 沈江洋. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/TextureRenderer/TextureRenderer/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // TextureRenderer
4 | //
5 | // Created by 沈江洋 on 2018/9/3.
6 | // Copyright © 2018 沈江洋. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/MeshFrame/MeshFrame/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // MetalCube
4 | //
5 | // Created by 沈江洋 on 2018/8/27.
6 | // Copyright © 2018 沈江洋. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 | #import
12 | #import "MetalContext.h"
13 | #import "MetalView.h"
14 | #import "FrameRenderer.h"
15 |
16 | @interface ViewController : UIViewController
17 |
18 |
19 | @end
20 |
21 |
--------------------------------------------------------------------------------
/MetalLinePrimitive/MetalLinePrimitive/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // MetalLinePrimitive
4 | //
5 | // Created by 沈江洋 on 2018/8/28.
6 | // Copyright © 2018 沈江洋. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/OffScreenRendering/OffScreenRendering/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // OffScreenRendering
4 | //
5 | // Created by 沈江洋 on 2018/9/5.
6 | // Copyright © 2018 沈江洋. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/TrueDepthStreaming/TrueDepthStreaming/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // TrueDepthStreaming
4 | //
5 | // Created by 沈江洋 on 2018/9/6.
6 | // Copyright © 2018 沈江洋. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/others/MeshFrameGlowing/MeshFrameGlowing/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // MeshFrameGlowing
4 | //
5 | // Created by 沈江洋 on 2018/9/5.
6 | // Copyright © 2018 沈江洋. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/TrueDepthStreaming/TrueDepthStreaming/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // GaussianBlurMPS
4 | //
5 | // Created by 沈江洋 on 2018/9/5.
6 | // Copyright © 2018 沈江洋. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 |
12 | @interface ViewController : UIViewController
13 |
14 | @property (weak, nonatomic) IBOutlet UIButton *startStreamButton;
15 |
16 | @property (weak, nonatomic) IBOutlet UIButton *stopStreamButton;
17 |
18 | @end
19 |
20 |
--------------------------------------------------------------------------------
/HelloMetal/HelloMetal/Metal/MetalView/MetalView.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | @protocol MetalViewDelegate
4 |
5 | - (void)onTouchesBegan:(CGPoint) pos;
6 |
7 | - (void)onTouchesMoved: (CGPoint) offset;
8 |
9 | - (void)onPinch: (BOOL) isZoomOut;
10 |
11 | @end
12 |
13 | @interface MetalView : UIView
14 |
15 | @property (nonatomic, assign) id delegate;
16 |
17 | @property (nonatomic, readonly) CAMetalLayer *metalLayer;
18 | @property (nonatomic, readonly) UITouch *currentTouch;
19 |
20 | @end
21 |
--------------------------------------------------------------------------------
/MeshFrame/MeshFrame/Metal/MetalView/MetalView.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | @protocol MetalViewDelegate
4 |
5 | - (void)onTouchesBegan:(CGPoint) pos;
6 |
7 | - (void)onTouchesMoved: (CGPoint) offset;
8 |
9 | - (void)onPinch: (BOOL) isZoomOut;
10 |
11 | @end
12 |
13 | @interface MetalView : UIView
14 |
15 | @property (nonatomic, assign) id delegate;
16 |
17 | @property (nonatomic, readonly) CAMetalLayer *metalLayer;
18 | @property (nonatomic, readonly) UITouch *currentTouch;
19 |
20 | @end
21 |
--------------------------------------------------------------------------------
/MetalCube/MetalCube/Metal/MetalView/MetalView.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | @protocol MetalViewDelegate
4 |
5 | - (void)onTouchesBegan:(CGPoint) pos;
6 |
7 | - (void)onTouchesMoved: (CGPoint) offset;
8 |
9 | - (void)onPinch: (BOOL) isZoomOut;
10 |
11 | @end
12 |
13 | @interface MetalView : UIView
14 |
15 | @property (nonatomic, assign) id delegate;
16 |
17 | @property (nonatomic, readonly) CAMetalLayer *metalLayer;
18 | @property (nonatomic, readonly) UITouch *currentTouch;
19 |
20 | @end
21 |
--------------------------------------------------------------------------------
/MetalLine/MetalLine/Metal/MetalView/MetalView.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | @protocol MetalViewDelegate
4 |
5 | - (void)onTouchesBegan:(CGPoint) pos;
6 |
7 | - (void)onTouchesMoved: (CGPoint) offset;
8 |
9 | - (void)onPinch: (BOOL) isZoomOut;
10 |
11 | @end
12 |
13 | @interface MetalView : UIView
14 |
15 | @property (nonatomic, assign) id delegate;
16 |
17 | @property (nonatomic, readonly) CAMetalLayer *metalLayer;
18 | @property (nonatomic, readonly) UITouch *currentTouch;
19 |
20 | @end
21 |
--------------------------------------------------------------------------------
/MetalPoint/MetalPoint/Metal/MetalView/MetalView.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | @protocol MetalViewDelegate
4 |
5 | - (void)onTouchesBegan:(CGPoint) pos;
6 |
7 | - (void)onTouchesMoved: (CGPoint) offset;
8 |
9 | - (void)onPinch: (BOOL) isZoomOut;
10 |
11 | @end
12 |
13 | @interface MetalView : UIView
14 |
15 | @property (nonatomic, assign) id delegate;
16 |
17 | @property (nonatomic, readonly) CAMetalLayer *metalLayer;
18 | @property (nonatomic, readonly) UITouch *currentTouch;
19 |
20 | @end
21 |
--------------------------------------------------------------------------------
/TrueDepthStreaming/TrueDepthStreaming/Metal/MetalRenderer/VideoRenderer/VideoRenderer.h:
--------------------------------------------------------------------------------
1 | //
2 | // VideoRenderer.h
3 | // TrueDepthStreaming
4 | //
5 | // Created by 沈江洋 on 2018/9/6.
6 | // Copyright © 2018 沈江洋. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "MetalContext.h"
11 |
12 | @interface VideoRenderer : NSObject
13 |
14 | - (instancetype)initWithLayer:(CAMetalLayer *)layer andContext: (MetalContext *)context;
15 | - (void)render: (CVPixelBufferRef)videoPixelBuffer;
16 |
17 | @end
18 |
--------------------------------------------------------------------------------
/GaussianBlurMPS/GaussianBlurMPS/Metal/MetalView/MetalView.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | @protocol MetalViewDelegate
4 |
5 | - (void)onTouchesBegan:(CGPoint) pos;
6 |
7 | - (void)onTouchesMoved: (CGPoint) offset;
8 |
9 | - (void)onPinch: (BOOL) isZoomOut;
10 |
11 | @end
12 |
13 | @interface MetalView : UIView
14 |
15 | @property (nonatomic, assign) id delegate;
16 |
17 | @property (nonatomic, readonly) CAMetalLayer *metalLayer;
18 | @property (nonatomic, readonly) UITouch *currentTouch;
19 |
20 | @end
21 |
--------------------------------------------------------------------------------
/TextureRenderer/TextureRenderer/Metal/MetalView/MetalView.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | @protocol MetalViewDelegate
4 |
5 | - (void)onTouchesBegan:(CGPoint) pos;
6 |
7 | - (void)onTouchesMoved: (CGPoint) offset;
8 |
9 | - (void)onPinch: (BOOL) isZoomOut;
10 |
11 | @end
12 |
13 | @interface MetalView : UIView
14 |
15 | @property (nonatomic, assign) id delegate;
16 |
17 | @property (nonatomic, readonly) CAMetalLayer *metalLayer;
18 | @property (nonatomic, readonly) UITouch *currentTouch;
19 |
20 | @end
21 |
--------------------------------------------------------------------------------
/others/MetalPoint/MetalPoint/Metal/MetalView/MetalView.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | @protocol MetalViewDelegate
4 |
5 | - (void)onTouchesBegan:(CGPoint) pos;
6 |
7 | - (void)onTouchesMoved: (CGPoint) offset;
8 |
9 | - (void)onPinch: (BOOL) isZoomOut;
10 |
11 | @end
12 |
13 | @interface MetalView : UIView
14 |
15 | @property (nonatomic, assign) id delegate;
16 |
17 | @property (nonatomic, readonly) CAMetalLayer *metalLayer;
18 | @property (nonatomic, readonly) UITouch *currentTouch;
19 |
20 | @end
21 |
--------------------------------------------------------------------------------
/MetalLinePrimitive/MetalLinePrimitive/Metal/MetalView/MetalView.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | @protocol MetalViewDelegate
4 |
5 | - (void)onTouchesBegan:(CGPoint) pos;
6 |
7 | - (void)onTouchesMoved: (CGPoint) offset;
8 |
9 | - (void)onPinch: (BOOL) isZoomOut;
10 |
11 | @end
12 |
13 | @interface MetalView : UIView
14 |
15 | @property (nonatomic, assign) id delegate;
16 |
17 | @property (nonatomic, readonly) CAMetalLayer *metalLayer;
18 | @property (nonatomic, readonly) UITouch *currentTouch;
19 |
20 | @end
21 |
--------------------------------------------------------------------------------
/OffScreenRendering/OffScreenRendering/Metal/MetalView/MetalView.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | @protocol MetalViewDelegate
4 |
5 | - (void)onTouchesBegan:(CGPoint) pos;
6 |
7 | - (void)onTouchesMoved: (CGPoint) offset;
8 |
9 | - (void)onPinch: (BOOL) isZoomOut;
10 |
11 | @end
12 |
13 | @interface MetalView : UIView
14 |
15 | @property (nonatomic, assign) id delegate;
16 |
17 | @property (nonatomic, readonly) CAMetalLayer *metalLayer;
18 | @property (nonatomic, readonly) UITouch *currentTouch;
19 |
20 | @end
21 |
--------------------------------------------------------------------------------
/TrueDepthStreaming/TrueDepthStreaming/Metal/MetalView/MetalView.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | @protocol MetalViewDelegate
4 |
5 | - (void)onTouchesBegan:(CGPoint) pos;
6 |
7 | - (void)onTouchesMoved: (CGPoint) offset;
8 |
9 | - (void)onPinch: (BOOL) isZoomOut;
10 |
11 | @end
12 |
13 | @interface MetalView : UIView
14 |
15 | @property (nonatomic, assign) id delegate;
16 |
17 | @property (nonatomic, readonly) CAMetalLayer *metalLayer;
18 | @property (nonatomic, readonly) UITouch *currentTouch;
19 |
20 | @end
21 |
--------------------------------------------------------------------------------
/others/MeshFrameGlowing/MeshFrameGlowing/Metal/MetalView/MetalView.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | @protocol MetalViewDelegate
4 |
5 | - (void)onTouchesBegan:(CGPoint) pos;
6 |
7 | - (void)onTouchesMoved: (CGPoint) offset;
8 |
9 | - (void)onPinch: (BOOL) isZoomOut;
10 |
11 | @end
12 |
13 | @interface MetalView : UIView
14 |
15 | @property (nonatomic, assign) id delegate;
16 |
17 | @property (nonatomic, readonly) CAMetalLayer *metalLayer;
18 | @property (nonatomic, readonly) UITouch *currentTouch;
19 |
20 | @end
21 |
--------------------------------------------------------------------------------
/HelloMetal/HelloMetal/Metal/MetalContext/MetalContext.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 |
4 | @protocol MTLDevice, MTLLibrary, MTLCommandQueue;
5 |
6 | @interface MetalContext : NSObject
7 |
8 | @property (strong) id device;
9 | @property (strong) id library;
10 | @property (strong) id commandQueue;
11 |
12 | +(instancetype)shareMetalContext;
13 |
14 | + (instancetype)newContext;
15 |
16 | - (id) textureFromPixelBuffer:(CVPixelBufferRef)videoPixelBuffer;
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/MeshFrame/MeshFrame/Metal/MetalContext/MetalContext.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 |
4 | @protocol MTLDevice, MTLLibrary, MTLCommandQueue;
5 |
6 | @interface MetalContext : NSObject
7 |
8 | @property (strong) id device;
9 | @property (strong) id library;
10 | @property (strong) id commandQueue;
11 |
12 | +(instancetype)shareMetalContext;
13 |
14 | + (instancetype)newContext;
15 |
16 | - (id) textureFromPixelBuffer:(CVPixelBufferRef)videoPixelBuffer;
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/MetalCube/MetalCube/Metal/MetalContext/MetalContext.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 |
4 | @protocol MTLDevice, MTLLibrary, MTLCommandQueue;
5 |
6 | @interface MetalContext : NSObject
7 |
8 | @property (strong) id device;
9 | @property (strong) id library;
10 | @property (strong) id commandQueue;
11 |
12 | +(instancetype)shareMetalContext;
13 |
14 | + (instancetype)newContext;
15 |
16 | - (id) textureFromPixelBuffer:(CVPixelBufferRef)videoPixelBuffer;
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/MetalLine/MetalLine/Metal/MetalContext/MetalContext.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 |
4 | @protocol MTLDevice, MTLLibrary, MTLCommandQueue;
5 |
6 | @interface MetalContext : NSObject
7 |
8 | @property (strong) id device;
9 | @property (strong) id library;
10 | @property (strong) id commandQueue;
11 |
12 | +(instancetype)shareMetalContext;
13 |
14 | + (instancetype)newContext;
15 |
16 | - (id) textureFromPixelBuffer:(CVPixelBufferRef)videoPixelBuffer;
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/MetalLine/MetalLine/Metal/MetalRenderer/LineRenderer/LineRenderer.h:
--------------------------------------------------------------------------------
1 | //
2 | // LineRenderer.h
3 | // MetalLine
4 | //
5 | // Created by 沈江洋 on 2018/8/18.
6 | // Copyright © 2018 沈江洋. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 | #import
12 | #import
13 | #import "MetalContext.h"
14 |
15 | @interface LineRenderer : NSObject
16 |
17 | - (instancetype)initWithLayer:(CAMetalLayer *)layer andContext: (MetalContext *)context;
18 | - (void)draw;
19 |
20 | @end
21 |
--------------------------------------------------------------------------------
/MetalPoint/MetalPoint/Metal/MetalContext/MetalContext.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 |
4 | @protocol MTLDevice, MTLLibrary, MTLCommandQueue;
5 |
6 | @interface MetalContext : NSObject
7 |
8 | @property (strong) id device;
9 | @property (strong) id library;
10 | @property (strong) id commandQueue;
11 |
12 | +(instancetype)shareMetalContext;
13 |
14 | + (instancetype)newContext;
15 |
16 | - (id) textureFromPixelBuffer:(CVPixelBufferRef)videoPixelBuffer;
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/HelloMetal/HelloMetal/Metal/MetalRenderer/LineRenderer/LineRenderer.h:
--------------------------------------------------------------------------------
1 | //
2 | // LineRenderer.h
3 | // MetalLine
4 | //
5 | // Created by 沈江洋 on 2018/8/18.
6 | // Copyright © 2018 沈江洋. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 | #import
12 | #import
13 | #import "MetalContext.h"
14 |
15 | @interface LineRenderer : NSObject
16 |
17 | - (instancetype)initWithLayer:(CAMetalLayer *)layer andContext: (MetalContext *)context;
18 | - (void)draw;
19 |
20 | @end
21 |
--------------------------------------------------------------------------------
/GaussianBlurMPS/GaussianBlurMPS/Metal/MetalContext/MetalContext.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 |
4 | @protocol MTLDevice, MTLLibrary, MTLCommandQueue;
5 |
6 | @interface MetalContext : NSObject
7 |
8 | @property (strong) id device;
9 | @property (strong) id library;
10 | @property (strong) id commandQueue;
11 |
12 | +(instancetype)shareMetalContext;
13 |
14 | + (instancetype)newContext;
15 |
16 | - (id) textureFromPixelBuffer:(CVPixelBufferRef)videoPixelBuffer;
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/MetalPoint/MetalPoint/Metal/MetalRenderer/PointRenderer/PointRenderer.h:
--------------------------------------------------------------------------------
1 | //
2 | // PointRenderer.h
3 | // MetalPoint
4 | //
5 | // Created by 沈江洋 on 2018/8/18.
6 | // Copyright © 2018 沈江洋. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 | #import
12 | #import
13 | #import "MetalContext.h"
14 |
15 | @interface PointRenderer : NSObject
16 |
17 | - (instancetype)initWithLayer:(CAMetalLayer *)layer andContext: (MetalContext *)context;
18 | - (void)draw;
19 |
20 | @end
21 |
--------------------------------------------------------------------------------
/TextureRenderer/TextureRenderer/Metal/MetalContext/MetalContext.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 |
4 | @protocol MTLDevice, MTLLibrary, MTLCommandQueue;
5 |
6 | @interface MetalContext : NSObject
7 |
8 | @property (strong) id device;
9 | @property (strong) id library;
10 | @property (strong) id commandQueue;
11 |
12 | +(instancetype)shareMetalContext;
13 |
14 | + (instancetype)newContext;
15 |
16 | - (id) textureFromPixelBuffer:(CVPixelBufferRef)videoPixelBuffer;
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/others/MetalPoint/MetalPoint/Metal/MetalContext/MetalContext.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 |
4 | @protocol MTLDevice, MTLLibrary, MTLCommandQueue;
5 |
6 | @interface MetalContext : NSObject
7 |
8 | @property (strong) id device;
9 | @property (strong) id library;
10 | @property (strong) id commandQueue;
11 |
12 | +(instancetype)shareMetalContext;
13 |
14 | + (instancetype)newContext;
15 |
16 | - (id) textureFromPixelBuffer:(CVPixelBufferRef)videoPixelBuffer;
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/MetalLinePrimitive/MetalLinePrimitive/Metal/MetalContext/MetalContext.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 |
4 | @protocol MTLDevice, MTLLibrary, MTLCommandQueue;
5 |
6 | @interface MetalContext : NSObject
7 |
8 | @property (strong) id device;
9 | @property (strong) id library;
10 | @property (strong) id commandQueue;
11 |
12 | +(instancetype)shareMetalContext;
13 |
14 | + (instancetype)newContext;
15 |
16 | - (id) textureFromPixelBuffer:(CVPixelBufferRef)videoPixelBuffer;
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/OffScreenRendering/OffScreenRendering/Metal/MetalContext/MetalContext.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 |
4 | @protocol MTLDevice, MTLLibrary, MTLCommandQueue;
5 |
6 | @interface MetalContext : NSObject
7 |
8 | @property (strong) id device;
9 | @property (strong) id library;
10 | @property (strong) id commandQueue;
11 |
12 | +(instancetype)shareMetalContext;
13 |
14 | + (instancetype)newContext;
15 |
16 | - (id) textureFromPixelBuffer:(CVPixelBufferRef)videoPixelBuffer;
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/HelloMetal/HelloMetal/Metal/MetalRenderer/TriangleRenderer/TriangleRenderer.h:
--------------------------------------------------------------------------------
1 | //
2 | // TriangleRenderer.h
3 | // HelloMetal
4 | //
5 | // Created by 沈江洋 on 2018/8/18.
6 | // Copyright © 2018 沈江洋. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 | #import
12 | #import
13 | #import "MetalContext.h"
14 |
15 | @interface TriangleRenderer : NSObject
16 |
17 | - (instancetype)initWithLayer:(CAMetalLayer *)layer andContext: (MetalContext *)context;
18 | - (void)draw;
19 |
20 | @end
21 |
--------------------------------------------------------------------------------
/MetalLinePrimitive/MetalLinePrimitive/Metal/MetalRenderer/LineRenderer/LineRenderer.h:
--------------------------------------------------------------------------------
1 | //
2 | // LineRenderer.h
3 | // MetalLine
4 | //
5 | // Created by 沈江洋 on 2018/8/18.
6 | // Copyright © 2018 沈江洋. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 | #import
12 | #import
13 | #import "MetalContext.h"
14 |
15 | @interface LineRenderer : NSObject
16 |
17 | - (instancetype)initWithLayer:(CAMetalLayer *)layer andContext: (MetalContext *)context;
18 | - (void)draw;
19 |
20 | @end
21 |
--------------------------------------------------------------------------------
/others/MeshFrameGlowing/MeshFrameGlowing/Metal/MetalContext/MetalContext.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 |
4 | @protocol MTLDevice, MTLLibrary, MTLCommandQueue;
5 |
6 | @interface MetalContext : NSObject
7 |
8 | @property (strong) id device;
9 | @property (strong) id library;
10 | @property (strong) id commandQueue;
11 |
12 | +(instancetype)shareMetalContext;
13 |
14 | + (instancetype)newContext;
15 |
16 | - (id) textureFromPixelBuffer:(CVPixelBufferRef)videoPixelBuffer;
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/GaussianBlurMPS/GaussianBlurMPS/Metal/MetalRenderer/VideoGaussianRenderer/VideoGaussianRenderer.h:
--------------------------------------------------------------------------------
1 | //
2 | // VideoGaussianRenderer.h
3 | // GaussianBlurMPS
4 | //
5 | // Created by 沈江洋 on 2018/9/5.
6 | // Copyright © 2018 沈江洋. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "MetalContext.h"
11 |
12 | @interface VideoGaussianRenderer : NSObject
13 |
14 | - (instancetype)initWithLayer:(CAMetalLayer *)layer andContext: (MetalContext *)context andSigma: (const float) sigma;
15 | - (void)render: (CVPixelBufferRef)videoPixelBuffer;
16 |
17 | @end
18 |
--------------------------------------------------------------------------------
/TrueDepthStreaming/TrueDepthStreaming/Metal/MetalRenderer/DepthRenderer/DepthRenderer.h:
--------------------------------------------------------------------------------
1 | //
2 | // DepthRenderer.h
3 | // TrueDepthStreaming
4 | //
5 | // Created by 沈江洋 on 2018/9/6.
6 | // Copyright © 2018 沈江洋. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "MetalContext.h"
11 |
12 | @interface DepthRenderer : NSObject
13 |
14 | - (instancetype)initWithLayer:(CAMetalLayer *)layer andContext: (MetalContext *)context;
15 | //- (void)render: (CVPixelBufferRef)videoPixelBuffer;
16 | - (void)render: (CVPixelBufferRef)depthPixelBuffer;
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/TextureRenderer/TextureRenderer/Metal/MetalRenderer/TextureRenderer/TextureRenderer.h:
--------------------------------------------------------------------------------
1 | //
2 | // TextureRenderer.h
3 | // Learn-Metal
4 | //
5 | // Created by 沈江洋 on 28/12/2017.
6 | // Copyright © 2017 沈江洋. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 | #import
12 | #import
13 |
14 | #import "MetalContext.h"
15 |
16 | @interface TextureRenderer : NSObject
17 |
18 | - (instancetype)initWithLayer:(CAMetalLayer *)layer andContext: (MetalContext *)context;
19 | - (void)draw: (id) inTexture;
20 |
21 | @end
22 |
--------------------------------------------------------------------------------
/TrueDepthStreaming/TrueDepthStreaming/Metal/MetalContext/MetalContext.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 |
4 | @protocol MTLDevice, MTLLibrary, MTLCommandQueue;
5 |
6 | @interface MetalContext : NSObject
7 |
8 | @property (strong) id device;
9 | @property (strong) id library;
10 | @property (strong) id commandQueue;
11 |
12 | +(instancetype)shareMetalContext;
13 |
14 | + (instancetype)newContext;
15 |
16 | - (id) textureFromPixelBuffer:(CVPixelBufferRef)videoPixelBuffer;
17 |
18 | - (id)bufferWithF16PixelBuffer:(CVPixelBufferRef)f16PixelBuffer;
19 |
20 | @end
21 |
--------------------------------------------------------------------------------
/MetalCube/MetalCube/Metal/MetalRenderer/MeshRenderer/MeshRenderer.h:
--------------------------------------------------------------------------------
1 | //
2 | // MeshRenderer.h
3 | // MetalCube
4 | //
5 | // Created by 沈江洋 on 2018/8/28.
6 | // Copyright © 2018 沈江洋. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 | #import
12 | #import
13 | #import "MetalContext.h"
14 |
15 | @interface MeshRenderer : NSObject
16 |
17 | - (instancetype)initWithLayer:(CAMetalLayer *)layer andContext: (MetalContext *)context;
18 | - (void)drawMesh: (id)vertexBuffer withIndexBuffer: (id)indexBuffer withMvpMatrix: (id)mvpTransform;
19 |
20 | @end
21 |
--------------------------------------------------------------------------------
/TrueDepthStreaming/TrueDepthStreaming/Metal/MetalEncoder/DisparityToTextureEncoder/DisparityToTextureEncoder.h:
--------------------------------------------------------------------------------
1 | //
2 | // DisparityToTextureEncoder.h
3 | // TrueDepthStreaming
4 | //
5 | // Created by 沈江洋 on 2018/9/6.
6 | // Copyright © 2018 沈江洋. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 | #import "MetalContext.h"
12 |
13 | @interface DisparityToTextureEncoder : NSObject
14 |
15 | - (instancetype)initWithContext: (MetalContext *)context;
16 | - (void)encodeToCommandBuffer: (id) commandBuffer inDisparityBuffer:(const id)inDisparityBuffer outTexture: (id) outTexture;
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/GaussianBlurMPS/GaussianBlurMPS/Metal/MetalEncoder/GaussianBlurEncoder/GaussianBlurEncoder.h:
--------------------------------------------------------------------------------
1 | //
2 | // GaussianBlurEncoder.h
3 | // GaussianBlurMPS
4 | //
5 | // Created by 沈江洋 on 2018/9/5.
6 | // Copyright © 2018 沈江洋. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 | #import "MetalContext.h"
12 |
13 | @interface GaussianBlurEncoder : NSObject
14 |
15 | - (instancetype)initWithContext: (MetalContext *)context andSigma: (const float) sigma;
16 | - (void)encodeToCommandBuffer: (id) commandBuffer srcTexture: (id) srcTexture dstTexture: (id) dstTexture;
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/others/MeshFrameGlowing/MeshFrameGlowing/Metal/MetalEncoder/GaussianBlurEncoder/GaussianBlurEncoder.h:
--------------------------------------------------------------------------------
1 | //
2 | // GaussianBlurEncoder.h
3 | // MeshFrameGlowing
4 | //
5 | // Created by 沈江洋 on 2018/9/5.
6 | // Copyright © 2018 沈江洋. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 | #import "MetalContext.h"
12 |
13 | @interface GaussianBlurEncoder : NSObject
14 |
15 | - (instancetype)initWithContext: (MetalContext *)context andSigma: (const float) sigma;
16 | - (void)encodeToCommandBuffer: (id) commandBuffer srcTexture: (id) srcTexture dstTexture: (id) dstTexture;
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/GaussianBlurMPS/GaussianBlurMPS/Metal/MetalEncoder/TextureRendererEncoder/TextureRendererEncoder.h:
--------------------------------------------------------------------------------
1 | //
2 | // TextureRendererEncoder.h
3 | // Learn-Metal
4 | //
5 | // Created by 沈江洋 on 28/12/2017.
6 | // Copyright © 2017 沈江洋. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 | #import
12 | #import
13 |
14 | #import "MetalContext.h"
15 |
16 | @interface TextureRendererEncoder : NSObject
17 |
18 | - (instancetype)initWithContext: (MetalContext *)context;
19 | - (void)encodeToCommandBuffer: (id) commandBuffer sourceTexture: (id) inTexture destinationTexture: (id) outTexture;
20 | @end
21 |
--------------------------------------------------------------------------------
/others/MeshFrameGlowing/MeshFrameGlowing/Metal/MetalEncoder/ImageBlenderEncoder/ImageBlenderEncoder.h:
--------------------------------------------------------------------------------
1 | //
2 | // ImageBlenderEncoder.h
3 | // MeshFrameGlowing
4 | //
5 | // Created by 沈江洋 on 2018/9/5.
6 | // Copyright © 2018 沈江洋. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 | #import "MetalContext.h"
12 |
13 | @interface ImageBlenderEncoder : NSObject
14 |
15 | - (instancetype)initWithContext: (MetalContext *)context andAlpha: (const float) alpha;
16 | - (void)encodeToCommandBuffer: (id) commandBuffer firstTexture: (id) firstTexture secondTexture: (id) secondTexture dstTexture: (id) dstTexture;
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/MetalLinePrimitive/MetalLinePrimitive/Metal/MetalRenderer/LineRenderer/line.metal:
--------------------------------------------------------------------------------
1 | //
2 | // line.metal
3 | // MetalLine
4 | //
5 | // Created by 沈江洋 on 2018/8/18.
6 | // Copyright © 2018 沈江洋. All rights reserved.
7 | //
8 |
9 | #include
10 | using namespace metal;
11 |
12 | struct Vertex
13 | {
14 | float4 position [[position]];
15 | float4 color;
16 | };
17 |
18 | vertex Vertex line_vertex_main(device Vertex *vertices [[buffer(0)]],
19 | uint vid [[vertex_id]])
20 | {
21 | Vertex outVertex = vertices[vid];
22 | return outVertex;
23 | }
24 |
25 | fragment float4 line_fragment_main(Vertex inVertex [[stage_in]])
26 | {
27 | return inVertex.color;
28 | }
29 |
30 |
--------------------------------------------------------------------------------
/TrueDepthStreaming/TrueDepthStreaming/Metal/MetalEncoder/TextureRendererEncoder/TextureRendererEncoder.h:
--------------------------------------------------------------------------------
1 | //
2 | // TextureRendererEncoder.h
3 | // Learn-Metal
4 | //
5 | // Created by 沈江洋 on 28/12/2017.
6 | // Copyright © 2017 沈江洋. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 | #import
12 | #import
13 |
14 | #import "MetalContext.h"
15 |
16 | @interface TextureRendererEncoder : NSObject
17 |
18 | - (instancetype)initWithContext: (MetalContext *)context;
19 | - (void)encodeToCommandBuffer: (id) commandBuffer sourceTexture: (id) inTexture destinationTexture: (id) outTexture;
20 | @end
21 |
--------------------------------------------------------------------------------
/OffScreenRendering/OffScreenRendering/Metal/MetalEncoder/TextureRendererEncoder/TextureRendererEncoder.h:
--------------------------------------------------------------------------------
1 | //
2 | // TextureRendererEncoder.h
3 | // Learn-Metal
4 | //
5 | // Created by 沈江洋 on 28/12/2017.
6 | // Copyright © 2017 沈江洋. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 | #import
12 | #import
13 |
14 | #import "MetalContext.h"
15 |
16 | @interface TextureRendererEncoder : NSObject
17 |
18 | - (instancetype)initWithContext: (MetalContext *)context;
19 | - (void)encodeToCommandBuffer: (id) commandBuffer sourceTexture: (id) inTexture destinationTexture: (id) outTexture;
20 |
21 | @end
22 |
--------------------------------------------------------------------------------
/others/MeshFrameGlowing/MeshFrameGlowing/Metal/MetalEncoder/TextureRendererEncoder/TextureRendererEncoder.h:
--------------------------------------------------------------------------------
1 | //
2 | // TextureRendererEncoder.h
3 | // Learn-Metal
4 | //
5 | // Created by 沈江洋 on 28/12/2017.
6 | // Copyright © 2017 沈江洋. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 | #import
12 | #import
13 |
14 | #import "MetalContext.h"
15 |
16 | @interface TextureRendererEncoder : NSObject
17 |
18 | - (instancetype)initWithContext: (MetalContext *)context;
19 | - (void)encodeToCommandBuffer: (id) commandBuffer sourceTexture: (id) inTexture destinationTexture: (id) outTexture;
20 |
21 | @end
22 |
--------------------------------------------------------------------------------
/HelloMetal/HelloMetal/Metal/MetalRenderer/LineRenderer/line.metal:
--------------------------------------------------------------------------------
1 | //
2 | // line.metal
3 | // MetalLine
4 | //
5 | // Created by 沈江洋 on 2018/8/18.
6 | // Copyright © 2018 沈江洋. All rights reserved.
7 | //
8 |
9 | #include
10 | using namespace metal;
11 |
12 | struct Vertex
13 | {
14 | float4 position [[position]];
15 | float4 color;
16 | };
17 |
18 | vertex Vertex line_vertex_main(device Vertex *vertices [[buffer(0)]],
19 | uint vid [[vertex_id]])
20 | {
21 | Vertex outVertex;
22 | outVertex.position = vertices[vid].position;
23 | outVertex.color = vertices[vid].color;
24 | return outVertex;
25 | }
26 |
27 | fragment float4 line_fragment_main(Vertex inVertex [[stage_in]])
28 | {
29 | return inVertex.color;
30 | }
31 |
32 |
--------------------------------------------------------------------------------
/MeshFrame/MeshFrame/Metal/MetalRenderer/FrameRenderer/FrameRenderer.h:
--------------------------------------------------------------------------------
1 | //
2 | // FrameRenderer.h
3 | // MeshFrame
4 | //
5 | // Created by 沈江洋 on 2018/8/29.
6 | // Copyright © 2018 沈江洋. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 | #import