updated materials to use the new shader system

This commit is contained in:
devZoGok
2021-11-10 20:17:31 +02:00
parent 84cd930911
commit 6a399c2470
2 changed files with 7 additions and 7 deletions
+4 -4
View File
@@ -37,12 +37,12 @@ namespace battleship{
root->createSkybox(path);
Quad *quad = new Quad(Vector3(size.x, size.y, 1) * 1, true);
Material *mat = new Material();
mat->setTexturingEnabled(true);
mat->setLightingEnabled(false);
Material *mat = new Material(root->getLibPath() + "texture");
mat->addVariable("texturingEnabled", true);
mat->addVariable("lightingEnabled", false);
string fr[]{PATH + "Textures/water.jpg"};
Texture *t = new Texture(fr, 1);
mat->addDiffuseMap(t);
mat->addVariable("textures[0]", t, true);
quad->setMaterial(mat);
Node *water = new Node();
water->attachMesh(quad);
+3 -3
View File
@@ -39,11 +39,11 @@ namespace battleship{
this->node = smgr->addAnimatedMeshSceneNode(mesh);
*/
this->node = new Model((projectileData::meshPath[id][weaponTypeId]));
Material *mat = new Material();
mat->setLightingEnabled(false);
Material *mat = new Material(Root::getSingleton()->getLibPath() + "texture");
mat->addVariable("lightingEnabled", false);
string f[]{projectileData::diffuseMapTextPath[id][weaponTypeId]};
Texture *diffuseTexture = new Texture(f, 1);
mat->addDiffuseMap(diffuseTexture);
mat->addVariable("textures[0]", diffuseTexture, true);
this->node->setMaterial(mat);
/*