I'm new bee to graphics programming and i have an existing code base which basically takes frame from video and passes it to metal shader where effects (like colour changes) happens.

Whats currently happening ?

I can use the existing method to send image as texture and it gets blended with the original frame and new frame is created .

what I want to achieve ?

I want to place multiple images on the original image in the same drawing call what would be the best way to achieve it? Should I change the existing render pipeline or shader can handle it.


It would help if you showed us some of your current code. But in general, you can add textures to your shader and then set them up in code by using -[MTLRenderCommandEncoder setFragmentTexture:atIndex:]. It may make sense to send them as a texture array, in which case you'd use -[MTLRenderCommandEncoder setFragmentTextures:withRange:].

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.