C# Класс ARCameraPostProcess, project-tango-poc

The post process distortion effect added on the virtual object. Enable/disable this script will turn on/off the distortion effect, leave it to disabled it's distortion is not crucial to your application.
Наследование: MonoBehaviour
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
m_arScreenMaterial Material
m_postProcessMaterial Material

Приватные методы

Метод Описание
OnDisable ( ) : void

Unity OnEnable callback. The reversed operation from the OnEnable() call.

OnEnable ( ) : void

Unity OnEnable callback. The distortion post process will be turned on after this script is enabled, at the same time, we need to change the distortion flag in AR Screen shader to true as well.

OnRenderImage ( RenderTexture src, RenderTexture dest ) : void

Unity OnRenderImage callback. Our customized post process shader will be excuted.

SetupIntrinsic ( TangoCameraIntrinsics intrinsics ) : void

Pass the camera intrinsics to both PostProcess and ARScreen shader. The camera intrinsics are needed for undistortion or distortion.

Описание свойств

m_arScreenMaterial публичное свойство

The AR screen material. Needed to dynamically turn on / off the undistortion effect on the AR image.
public Material m_arScreenMaterial
Результат Material

m_postProcessMaterial публичное свойство

The post process shader that is running on the camera.
public Material m_postProcessMaterial
Результат Material