Light.renderMode 渲染模式

var renderMode : LightRenderMode

Description描述

How to render the light.

灯光怎样渲染。

可以是LightRenderMode.Auto, LightRenderMode.ForceVertex or LightRenderMode.ForcePixel.

Pixel lights render slower but look better, especially on not very highly tesselated geometry. Some effects (e.g. bumpmapping) are only displayed for pixel lights.

像素光渲染比较慢但是看起来较好,尤其是对那些没有很好面数的几何体。一些效果(例如凹凸)只会在像素光照下显示。

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
	void Awake() {
		light.renderMode = LightRenderMode.ForceVertex;
	}
}
// Make the light only render with vertex lighting
//使灯光只以点光照模式渲染

light.renderMode = LightRenderMode.ForceVertex;
Page last updated: 2011-3-30