Skip to content

alexstaravoitau/MetalRenderCamera

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MetalRenderCamera

A simple app that grabs raw camera data, converts to textures and renders on screen using Metal.

The app uses two reusable components with (hopefully!) simple and straightforward interfaces: MetalCameraSession and MTKViewController.

MetalCameraSession

MetalCameraSession helps you grab raw camera data as pixel buffers with either of two pixel formats and convert it to a Metal texture (or textures). You can choose either of two pixel formats: RGB or YCbCr, RGB being a default option, since it produces a single texture that can be drawn on screen right away. YCbCr would be a better choice in some cases though, since it is a hardware native format, hence works faster and produces textures of smaller size.

MTKViewController

MTKViewController is a UIViewController subclass containing a MTKView that renders an arbitrary texture on screen with the help of a couple of small Metal shaders.

About

A simple app that grabs raw camera data, converts to textures and renders on screen with Metal.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published