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:
parent
bf197fe41d
commit
fb07556993
1 changed files with 9 additions and 9 deletions
|
@ -48,13 +48,13 @@ class SDCarShader{
|
||||||
private :
|
private :
|
||||||
osg::Node *pCar;
|
osg::Node *pCar;
|
||||||
osg::StateSet* stateset;
|
osg::StateSet* stateset;
|
||||||
osg::Uniform * diffuseMap;
|
osg::ref_ptr<osg::Uniform> diffuseMap;
|
||||||
//osg::Uniform * normalMap;
|
//osg::Uniform * normalMap;
|
||||||
osg::Uniform * specularColor;
|
osg::ref_ptr<osg::Uniform> specularColor;
|
||||||
osg::Uniform * lightVector;
|
osg::ref_ptr<osg::Uniform> lightVector;
|
||||||
osg::Uniform * lightPower;
|
osg::ref_ptr<osg::Uniform> lightPower;
|
||||||
osg::Uniform * ambientColor;
|
osg::ref_ptr<osg::Uniform> ambientColor;
|
||||||
osg::Uniform * shininess;
|
osg::ref_ptr<osg::Uniform> shininess;
|
||||||
|
|
||||||
public :
|
public :
|
||||||
static void initiateShaderProgram(){
|
static void initiateShaderProgram(){
|
||||||
|
@ -130,9 +130,9 @@ public :
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
this->lightVector->set(osg::Vec3f(lv.x(),lv.y(),lv.z()));
|
lightVector->set(osg::Vec3f(lv.x(),lv.y(),lv.z()));
|
||||||
this->lightPower->set(sun_color);
|
lightPower->set(sun_color);
|
||||||
this->ambientColor->set(scene_color);
|
ambientColor->set(scene_color);
|
||||||
//this->mvmatrix->set(mvm);
|
//this->mvmatrix->set(mvm);
|
||||||
// this->normalmatrix->set(m);
|
// this->normalmatrix->set(m);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue