#import <CC3TextureUnit.h>
Properties | |
BOOL | isBumpMap |
Properties inherited from CC3TextureUnit | |
CCColorRef | color |
ccColor4F | constantColor |
BOOL | isBumpMap |
CC3Vector | lightDirection |
CCOpacity | opacity |
CC3DOT3RGB | rgbNormalMap |
GLenum | textureEnvironmentMode |
Additional Inherited Members | |
Instance Methods inherited from CC3TextureUnit | |
(void) | - bindWithVisitor: |
Class Methods inherited from CC3TextureUnit | |
(void) | + bindDefaultWithVisitor: |
(id) | + textureUnit |
A texture unit configured for DOT3 bump-mapping.
It will combine the per-pixel normal vectors found in the texture with the constantColor property to derive per-pixel luminosity.
Typically, the value of the constantColor property is not set directly, but is established automatically by setting the lightDirection property to indicate the direction of the light source, in tanget-space coordinates. See the notes of the lightDirection property for more information about establishing the direction of the light source.
This implementation combines the texture RGB components (rdbSource0) with the value of constantColor (as rgbSource1), using a DOT3 combining function. If you need more flexibility in configuing the bump-mapping, consider using an instance of CC3ConfigurableTextureUnit.
When using bump-mapping, you should associate this texture unit with the first texture of a material to establish per-pixel luminosity, and then add any additional textures (ie- the visible texture) on the material so they will be combined with the luminosity output.
|
readnonatomicassign |
Returns whether this texture unit is configured as a bump-map.
This implementation always returns YES.