Added built-in support for lighting.vert

This commit is contained in:
Robert Osfield
2017-10-20 11:37:41 +01:00
parent 4645cc789e
commit a2ad1c9606
2 changed files with 29 additions and 1 deletions

View File

@@ -554,7 +554,10 @@ osg::ref_ptr<osg::Program> GeometryPool::getOrCreateProgram(LayerTypes& layerTyp
_programMap[layerTypes] = program;
// add shader that provides the lighting functions
program->addShader(osgDB::readRefShaderFile("shaders/lighting.vert"));
{
#include "shaders/lighting_vert.cpp"
program->addShader(osgDB::readRefShaderFileWithFallback(osg::Shader::VERTEX, "shaders/lighting.vert", lighting_vert));
}
// OSG_NOTICE<<") creating new Program "<<program.get()<<std::endl;
{