DepthBox is a composable component that utilizes the power of Android's AGSL shaders to create a depth effect by placing its child composables at a selected depth level of a specified background image.
At the moment, it's just a prototype and doesn't support depth map generation, so you need to obtain one yourself or use a Google Camera photo taken in Portrait mode (it has a depth map embedded in the image).
GoogleCameraDepthImageRepository
is used to retrieve the required image components from a single Google Camera photo.DefaultDoubleSourceImageRepository
allows you to provide your own depth map. Make sure the depth map image has the same aspect ratio as the main image.