Camera.depthTextureMode 深度纹理模式

var depthTextureMode : DepthTextureMode


How and if camera generates a depth texture.


A camera can build a screen-space depth texture. This is mostly useful for image post-processing effects. Note that generating the texture incurs a performance cost.


参见: DepthTextureMode.

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
	public void Awake() {
		camera.depthTextureMode = DepthTextureMode.DepthNormals;
// Generate a depth + normals texture

camera.depthTextureMode = DepthTextureMode.DepthNormals;
Page last updated: 2011-3-7