AFathi / ARVideoKit

Capture & record ARKit videos 📹, photos 🌄, Live Photos 🎇, and GIFs 🎆.
Apache License 2.0
1.62k stars 227 forks source link

Surface shader result not recorded. #131

Open ozgurshn opened 2 years ago

ozgurshn commented 2 years ago

Issue environment:

Device Model: iPhone mini running iOS 15 Xcode Version: Xcode 13 iOS Version: iOS 15 Pod Version or Repo Commit: Issue Details: I record the scene where I play a video ver a SCNPlane in which I remove green background of video using surface shader. This cause recorded video to have a white background instead of transparent one. Any ideas why shader result is not recorded? IMG_5887 IMG_5889

AFathi commented 2 years ago

@ozgurshn, what's the video format?

I've seen similar implementations of this and I recommend pre-processing the video, exporting it on device then rendering it in the AR scene instead of applying shaders and immediately displaying it in the scene.

Let me know if that works

ozgurshn commented 2 years ago

@AFathi thanks for the suggestion. Video format is MP4.

ozgurshn commented 2 years ago

Tried pre-processing ( replacing green with alpha=0 using CIColorCube ) and play that video but that made the video semi-transparent with screen blend mode and black backgrounded with alpha blend mode.