wrong sign

This commit is contained in:
yangxiao 2014-10-20 15:52:27 +08:00
parent 58a1fbcf0b
commit e3becc5538
1 changed files with 4 additions and 4 deletions

View File

@ -142,7 +142,7 @@ Please refer to this document: [ReadMe](../README.md)
To make 3d objects looks realistic, we add lights to this version. cocos2d-x supports four types of lights, direction light, point light, spot light and ambient light.
'DirectionLight' is meant to represent an extremely distant light source (like the sun or moon). Rays cast from directional lights run parallel in a single direction from every point in the sky, and are typically used to simulate the sun light.
`DirectionLight` is meant to represent an extremely distant light source (like the sun or moon). Rays cast from directional lights run parallel in a single direction from every point in the sky, and are typically used to simulate the sun light.
The following code can add a directional light to the scene,
@ -165,11 +165,11 @@ directionalLight->setLightFlag(LightFlag::LIGHT0);
Then the 3d sprite whose light mask AND light flag is none zero can effect by the light.
'PointLight' casts illumination outward in every direction from a single, infinitely small point in 3D space. It is useful for simulating any omnidirectional light source.
`PointLight` casts illumination outward in every direction from a single, infinitely small point in 3D space. It is useful for simulating any omnidirectional light source.
'SpotLight' emits a cone shaped light field from a single point in space. It can be used to simulate desk lamps, overhead cone lighting, etc. Note that 'SpotLight' will take more GPU time.
`SpotLight` emits a cone shaped light field from a single point in space. It can be used to simulate desk lamps, overhead cone lighting, etc. Note that 'SpotLight' will take more GPU time.
'AmbientLight' casts soft rays in every direction.
`AmbientLight` casts soft rays in every direction.
Note that we use forward render method, the number of lights can effect the performance. You can set the max number of lights supported in the shader in a the configuration file.