How to do virtual light model

Include the following details (edit as applicable):

  • Issue category: Real-time Mapping-Depth
  • Device type & OS version: iOS
  • Host machine & OS version: Mac
  • Issue Environment : Unity Remote / Unity Mock / On Device / Dev Portal

Description of the issue:

How to detect distance of real world elements to the camera? I would like to place a virtual light source and then do phong light using the position of elements relative to the camera to calculate a virtual diffuse value.
I dont really know where to start from. I appreciate the help.

Hello Camilo,

Depth Texture Tutorial ” would be the best starting point for you. Please refer to
ARDepthManager developer documentation, to look for the “GetDistance” method in IDepthBufferProcessor.
Hope this information helps you.