Skip to content

setGlobalDepthAlpha

cjcliffe edited this page Oct 15, 2011 · 3 revisions

CubicVR.setGlobalDepthAlpha

setGlobalDepthAlpha( state, near, far ) alias: CubicVR.GLCore.setDepthAlpha()

Enable/Disable and update the near/far linear depth for using Depth Alpha.

When Depth Alpha is enabled the resulting Alpha channel after rendering will contain the depth component in linear form 0.0->1.0 representing near/far planes. This is typically used in conjunction with post-process shaders to provide depth information to Depth-of-Field (DOF), Screen-Space Ambient Occlusion (SSAO) or other effects.

Parameters:

  • state : true or false to enable or disable Depth Alpha respectively.
  • near : the view NEAR clipping plane.
  • far : the view FAR clipping plane.

Returns:

none

Clone this wiki locally