maybe fixed bug with shader lightning

git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@5494 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 8b896658e7c1ad9b2a805f30619b367fcdb5623f
Former-commit-id: b9bcaf08ca0d7713c42df1f65b287caea876a070
This commit is contained in:
torcs-ng 2013-06-04 23:13:03 +00:00
parent bf197fe41d
commit fb07556993

View file

@ -48,13 +48,13 @@ class SDCarShader{
private :
osg::Node *pCar;
osg::StateSet* stateset;
osg::Uniform * diffuseMap;
osg::ref_ptr<osg::Uniform> diffuseMap;
//osg::Uniform * normalMap;
osg::Uniform * specularColor;
osg::Uniform * lightVector;
osg::Uniform * lightPower;
osg::Uniform * ambientColor;
osg::Uniform * shininess;
osg::ref_ptr<osg::Uniform> specularColor;
osg::ref_ptr<osg::Uniform> lightVector;
osg::ref_ptr<osg::Uniform> lightPower;
osg::ref_ptr<osg::Uniform> ambientColor;
osg::ref_ptr<osg::Uniform> shininess;
public :
static void initiateShaderProgram(){
@ -130,9 +130,9 @@ public :
this->lightVector->set(osg::Vec3f(lv.x(),lv.y(),lv.z()));
this->lightPower->set(sun_color);
this->ambientColor->set(scene_color);
lightVector->set(osg::Vec3f(lv.x(),lv.y(),lv.z()));
lightPower->set(sun_color);
ambientColor->set(scene_color);
//this->mvmatrix->set(mvm);
// this->normalmatrix->set(m);