if ( VRSettings . isDeviceActive )
{
int w = VRSettings . eyeTextureWidth ;
int h = VRSettings . eyeTextureHeight ;
var aa = QualitySettings . antiAliasing ;
if ( aa < 1 )
aa = 1 ;
// TODO: this won't work in...the Player
var stereoPath = PlayerSettings . stereoRenderingPath ;
if ( StereoRenderingPath . Instancing = = stereoPath ) // can't actually check for GetGraphicsCaps().hasRenderTargetArrayIndexFromAnyShader...yet
{
bindTempRTCmd . GetTemporaryRTArray ( intermediateRT , w , h , 2 , 0 , FilterMode . Point , RenderTextureFormat . Default , RenderTextureReadWrite . Default , aa , true ) ;
bindTempRTCmd . GetTemporaryRTArray ( intermediateDepthRT , w , h , 2 , 2 4 , FilterMode . Point , RenderTextureFormat . Depth ) ;
}
else
{
bindTempRTCmd . GetTemporaryRT ( intermediateRT , w , h , 0 , FilterMode . Point , RenderTextureFormat . Default , RenderTextureReadWrite . Default , aa , true ) ;
bindTempRTCmd . GetTemporaryRT ( intermediateDepthRT , w , h , 2 4 , FilterMode . Point , RenderTextureFormat . Depth ) ;
}
bindTempRTCmd . SetRenderTarget ( intermediateRTID , intermediateDepthRTID ) ;
RenderTextureDesc vrDesc = VRDevice . GetVREyeTextureDesc ( ) ;
vrDesc . depthBufferBits = 2 4 ;
bindTempRTCmd . GetTemporaryRT ( intermediateRT , vrDesc , FilterMode . Point ) ;
bindTempRTCmd . SetRenderTarget ( intermediateRTID ) ;
context . ExecuteCommandBuffer ( bindTempRTCmd ) ;
bindTempRTCmd . Dispose ( ) ;
}
// this does the combined color/depth RT
bindTempRTCmd . GetTemporaryRT ( intermediateRT , w , h , 2 4 , FilterMode . Point , RenderTextureFormat . Default , RenderTextureReadWrite . Default , aa , true ) ;
bindTempRTCmd . SetRenderTarget ( intermediateRTID ) ;
//bindTempRTCmd.GetTemporaryRT(intermediateDepthRT, w, h, 24, FilterMode.Point, RenderTextureFormat.Depth);
//bindTempRTCmd.SetRenderTarget(intermediateRTID, intermediateDepthRTID);
context . ExecuteCommandBuffer ( bindTempRTCmd ) ;
bindTempRTCmd . Dispose ( ) ;
}