본문 바로가기

Metal Graphics6

Day6. Pipelines + CommandEncoder 요약: 메탈을 이용해 실제로 간단한 덧셈 연산을 해보자 Thirty Days of Metal — Day 6: Pipelines Learn how to write Metal kernel functions and tell the GPU to perform blocks of work in parallel medium.com 이전에 학습 복습 device 객체가 무엇인지, 그래픽 데이터 자원을 어떻게 처리하고 명령어는 어떻게 처리하는지 명령어와 데이터를 담는 buffer를 만드는 법 GPU에게 buffer의 정보를 보내는 법 쉐이더 명령어로 GPU가 작업을 처리하게 하는 법 💡 이젠 쉐이더 명령어에 맞게 buffer의 데이터를 처리 할 방법을 알 필요가 있다. Kernel Functions 단순히 계산 하는데 .. 2023. 7. 21.
SwiftUI에 MTKView 적용하기 SwiftUI에 WKWebView와 LottieView 적용하기를 구현하다가 MTKView도 적용해보고 싶어졌다. 1. ContentView 💡 SwiftUI에서 제공하는 Rectangle을 아래에, 위로는 MetalKit View로 구동하는 View를 올려보자 2. MTKView용 UIViewRepresentable 만들기 💡 MetalKit으로 삼각형 그리기 코드를 그대로 사용한다. SwiftUI와 기존 UIKit에서 MTKView의 기본 구조 살펴보기 MetalKit 사용의 가장 기본적인 구조는 UIKit에서 제공하는 MTKView를 생성하고 Metalkit과 관련된 렌더링 기능을 수행하는 delegate를 만드는 것이다. ⇒ MTKViewDelegate 프로토콜이 존재한다. 그런데 이 프로토콜은 .. 2023. 2. 24.
Day5. Shaders 쉐이딩 프로그래밍 소개 Thirty Days of Metal — Day 5: Shaders Continuing our exploration of graphics programming, we take our first look at shaders and the graphics pipeline. medium.com 그래픽스에서 Shader에 대한 소개 💡 쉐이더: GPU가 실행하는 작은 프로그램들 Pixar RenderMan - Wikipedia From Wikipedia, the free encyclopedia Jump to navigation Jump to search 3D rendering software used by Pixar Pixar RenderMan (formerly PhotoRealistic.. 2022. 12. 4.
Day4. MTKView Thirty Days of Metal — Day 4: MTKView This series of posts is my attempt to present the Metal graphics programming framework in small, bite-sized chunks for Swift app developers… medium.com 요약: iOS, 맥용 응용 프로그램에서 Metal을 사용하게 도와주는 MTKView MTKView와 MetalKit 대한 소개 MetalKit은 Metal을 고차원 레벨에서 쉽게 사용하도록 도와주는 프레임워크이다. MTKView는 UIKit에 있는 기본 View 클래스의 하위 클래스이다. 맥 OS의 경우는 NSView를 상속받고 iOS를 UIView를 상속 받는다. 추가.. 2022. 12. 4.