/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield 
 *
 * This library is open source and may be redistributed and/or modified under  
 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or 
 * (at your option) any later version.  The full license is in LICENSE file
 * included with this distribution, and on the openscenegraph.org website.
 * 
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
 * OpenSceneGraph Public License for more details.
*/
//osgFX - Copyright (C) 2003 Marco Jez

#ifndef OSGFX_BUMPMAPPING_
#define OSGFX_BUMPMAPPING_

#include <osgFX/Export>
#include <osgFX/Effect>

#include <osg/ref_ptr>
#include <osg/Texture2D>

namespace osgFX
{

    /**
     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.
     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 am.The 
     latter is more limited though since it can't handle am.The 
     latter is more limited though since it can't handle am.The 
     latter is more limited though since it can't handle am.The 
     latter is more limited though since it can't handle am.The 
     latter is more limited though since it can't handle am.The 
     latter is more limited though since it can't handle am.The 
     latter is more limited though since it can't handle am.The 
     latter is more limited though since it can't handle am.The 
     latter is more limited though since it can't handle am.The 
     latter is more limited though since it can't handle am.The 
     latter is more limited though since it can't handle am.The 
     latter is more limited though since it can't handle am.The 
     latter is more limited though since it can't handle am.The 
     latter is more limited though since it can't handle am.The 
     latter is more limited though since it can't handle am.The 
     latter is more limited though since it can't handle am.The 
     latter is more limited though since it can't handle am.The 
     latter is more limited though since it can't handle am.The 
     latter is more limited though since it can't handle am.The 
     latter is more limited though since it can't handle am.The 
     latter is more limited though since it can't handle am.The 
     latter is more limited though since it can't handle am.The 
     latter is more limited though since it can't handle am.The 
     latter is more limited though since it can't handle am.The 
     latter is more limited though since it can't handle am.The 
     latter is more limited though since it can't handle am.The 
     latter is more limited though since it can't handle am.The 
     latter is more limited though since it can't handle am.The 
     latter is more limited though since it can't handle am.The 
     latter is more limited though since it can't handle am.The 
     latter is more limited though since it can't handle am.The 
     latter is more limited though since it can't handle am.The 
     latter is more limited though since it can't handle am.The 
     latter is more limited though since it can't handle am.The 
     latter is more limited though since it can't handle am.The 
     latter is more limited though since it can't handle am.The 
     latter is more limited though since it can't handle am.The 
     latter is more limited though since it can't handle am.The 
     latter is more limited though since it can't handle am.The 
     latter is more limited though since it can't handle am.The 
     latter is more limited though since it can't handle am.The 
     latter is more limited though since it can't handle am.The 
     latter is more limited though since it can't handle am.The 
     latter is more limited though since it can't handle am.The 
     latter is more limited though since it can't handle am.The 
     latter is more limited though since it can't handle am.The 
     latter is more limited though since it can't handle am.The 
     latter is more limited though since it can't handle am.The 
     latter is more limited though since it can't handle am.The 
     latter is more limited though since it can't handle am.The 
     latter is more limited though since it can't handle am.The 
     latter is more limited though since it can't handle am.The 
     latter is more limited though since it can't handle am.The 
     latter is more limited though since it can't handle am.The 
     latter is more limited though since it can't handle am.The 
     latter is more limited though since it can't handle am.The 
     latter is more limited though since it can't handle am.The 
     latter is more limited though since it can't handle am.The 
     latter is more limited though since it can't handle am.The 
     latter is more limited though since it can't handle am.The 
     latter is more limited though since it can't handle am.The 
     latter is more limited though since it can't handle am.The 
     latter is more limited though since it can't handle am.The 
     latter is more limited though since it can't handle am.The 
     latter is more limited though since it can't handle am.The 
     latter is more limited though since it can't handle am.The 
     latter is more limited though since it can't handle am.The 
     latter is more limited though since it can't handle am.The 
     latter is more limited though since it can't handle am.The 
     latter is more limited though since it can't handle am.The 
     latter is more limited though since it can't handle am.The 
     latter is more limited though since it can't handle am.The 
     latter is more limited though since it can't handle am.The 
     latter is more limited though since it can't handle am.The 
     latter is more limited though since it can't handle am.The 
     latter is more limited though since it can't handle am.The 
     latter is more limited though since it can't handle am.The 
     latter is more limited though since it can't handle am.The 
     latter is more limited though since it can't handle am.The 
     latter is more limited though since it can't handle am.The 
     latter is more limited though since it can't handle am.The 
     latter is more limited though since it can't handle am.The 
     latter is more limited though since it can't handle am.The 
     latter is more limited though since it can't handle am.The 
     latter is more limited though since it can't handle am.The 
     latter is 