C# Class 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.
Inheritance: MonoBehaviour
Mostrar archivo Open project: stetro/project-tango-poc Class Usage Examples

Public Properties

Property Type Description
m_arScreenMaterial Material
m_postProcessMaterial Material

Private Methods

Method Description
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.

Property Details

m_arScreenMaterial public_oe property

The AR screen material. Needed to dynamically turn on / off the undistortion effect on the AR image.
public Material m_arScreenMaterial
return Material

m_postProcessMaterial public_oe property

The post process shader that is running on the camera.
public Material m_postProcessMaterial
return Material