15#ifndef OSGFX_BUMPMAPPING_
16#define OSGFX_BUMPMAPPING_
49 "This effect makes surfaces appear bumpy. Children nodes must use two textures, "
50 "one for diffuse color and one for the normal map (which can be created "
51 "from a height map with tools like nVIDIA's normal map generator). Furthermore, "
52 "tangent-space basis vectors must be created and assigned to each Geometry; this "
53 "can be done quickly by calling BumpMapping::prepareChildren(). Note that both "
54 "diffuse and normal map textures must have corresponding UV maps defined in "
56 "This effect defines a preferred technique which uses ARB vertex & fragment "
57 "programs, and a fallback technique which doesn't use fragment programs. The "
58 "latter is more limited though since it can't handle ambient and specular "
65 inline int getLightNumber()
const;
68 inline void setLightNumber(
int n);
71 inline int getDiffuseTextureUnit()
const;
74 inline void setDiffuseTextureUnit(
int n);
77 inline int getNormalMapTextureUnit()
const;
80 inline void setNormalMapTextureUnit(
int n);
144 return _diffuse_unit;
166 return _diffuse_tex.
get();
171 return _diffuse_tex.
get();
176 _diffuse_tex = texture;
182 return _normal_tex.
get();
187 return _normal_tex.
get();
192 _normal_tex = texture;
Definition BumpMapping:40
void setDiffuseTextureUnit(int n)
Definition BumpMapping:147
BumpMapping(const BumpMapping ©, const osg::CopyOp ©op=osg::CopyOp::SHALLOW_COPY)
void setLightNumber(int n)
Definition BumpMapping:136
int getDiffuseTextureUnit() const
Definition BumpMapping:142
BumpMapping & operator=(const BumpMapping &)
Definition BumpMapping:117
META_Effect(osgFX, BumpMapping, "Bump Mapping", "This effect makes surfaces appear bumpy. Children nodes must use two textures, " "one for diffuse color and one for the normal map (which can be created " "from a height map with tools like nVIDIA's normal map generator). Furthermore, " "tangent-space basis vectors must be created and assigned to each Geometry; this " "can be done quickly by calling BumpMapping::prepareChildren(). Note that both " "diffuse and normal map textures must have corresponding UV maps defined in " "Geometry objects.\n" "This effect defines a preferred technique which uses ARB vertex & fragment " "programs, and a fallback technique which doesn't use fragment programs. The " "latter is more limited though since it can't handle ambient and specular " "components.", "Marco Jez")
osg::Texture2D * getOverrideNormalMapTexture()
Definition BumpMapping:180
void setOverrideNormalMapTexture(osg::Texture2D *texture)
Definition BumpMapping:190
osg::Texture2D * getOverrideDiffuseTexture()
Definition BumpMapping:164
void setOverrideDiffuseTexture(osg::Texture2D *texture)
Definition BumpMapping:174
int getLightNumber() const
Definition BumpMapping:131
virtual ~BumpMapping()
Definition BumpMapping:116
void setNormalMapTextureUnit(int n)
Definition BumpMapping:158
void prepareNode(osg::Node *node)
void prepareGeometry(osg::Geometry *geo)
int getNormalMapTextureUnit() const
Definition BumpMapping:153
void dirtyTechniques()
Definition Effect:207
@ SHALLOW_COPY
Definition CopyOp:47
T * get() const
Definition ref_ptr:117
Definition AnisotropicLighting:25
#define OSGFX_EXPORT
Definition osgFX/Export:27