By
Weber Wang
更新日期:
文章目录
SpotLight
,聚光灯,顾名思义,像聚光灯一样,一个点出发,光线是不平行的,有一个外圈和内圈,类似用过的可以调节聚光的手电:
1 2 3 4 5 6 7
| var spotLight: SpotLight= new SpotLight(); spotLight.diffuse= .2; spotLight.shadowCastingType= ShadowMappingType.MATRIX; spotLight.shadowMapSize= 1024; spotLight.outerRadius= Math.PI / 2; spotLight.innerRadius= 0; spotLight.shadowMapQuality= ShadowMappingQuality.LOW;
|
diffuse光线的强度,越大越亮;
shadowCastingType,投影类型,影响影子的形状;
shadowMapSize,投影纹理的长宽,是一个正方形的纹理;outerRadius外圈半径;
innerRadius内圈半径;
shadowMapQuality投影质量,为了节省性能,一般用low就行