@ -153,7 +153,7 @@ namespace
namespace Terrain
{
std : : vector < osg : : ref_ptr < osg : : StateSet > > createPasses ( bool useShaders , bool forcePerPixelLighting , bool clampLighting , Shader : : ShaderManager * shaderManager , const std : : vector < TextureLayer > & layers ,
std : : vector < osg : : ref_ptr < osg : : StateSet > > createPasses ( bool useShaders , Shader : : ShaderManager * shaderManager , const std : : vector < TextureLayer > & layers ,
const std : : vector < osg : : ref_ptr < osg : : Texture2D > > & blendmaps , int blendmapScale , float layerTileSize )
{
std : : vector < osg : : ref_ptr < osg : : StateSet > > passes ;
@ -211,8 +211,6 @@ namespace Terrain
}
Shader : : ShaderManager : : DefineMap defineMap ;
defineMap [ " forcePPL " ] = forcePerPixelLighting ? " 1 " : " 0 " ;
defineMap [ " clamp " ] = clampLighting ? " 1 " : " 0 " ;
defineMap [ " normalMap " ] = ( it - > mNormalMap ) ? " 1 " : " 0 " ;
defineMap [ " blendMap " ] = ! firstLayer ? " 1 " : " 0 " ;
defineMap [ " specularMap " ] = it - > mSpecular ? " 1 " : " 0 " ;
@ -223,7 +221,7 @@ namespace Terrain
if ( ! vertexShader | | ! fragmentShader )
{
// Try again without shader. Error already logged by above
return createPasses ( false , forcePerPixelLighting, clampLighting , shaderManager, layers , blendmaps , blendmapScale , layerTileSize ) ;
return createPasses ( false , shaderManager, layers , blendmaps , blendmapScale , layerTileSize ) ;
}
stateset - > setAttributeAndModes ( shaderManager - > getProgram ( vertexShader , fragmentShader ) ) ;