Revert "animatable textures"

This reverts commit 8226a9479ce8ab45bed5bc6acbba63eaaf0e6330.

point light shadows
fixed spotlights
geometry shaders
This commit is contained in:
devZoGok
2021-10-19 19:06:40 +03:00
parent 0193216ebb
commit c7940f7280
14 changed files with 270 additions and 142 deletions
+4 -5
View File
@@ -87,21 +87,20 @@ namespace vb01{
void Node::addLight(Light *light){
lights.push_back(light);
light->setNode(this);
Root *root=Root::getSingleton();
Node *rootNode=Root::getSingleton()->getRootNode();
vector<Node*> descendants;
rootNode->getDescendants(rootNode,descendants);
descendants.push_back(rootNode);
int numLights=0;
for(Node *n : descendants)
numLights+=n->getNumLights();
root->numLights++;
for(Node *n : descendants){
vector<Mesh*> meshes=n->getMeshes();
for(Mesh *m : meshes){
Material *mat=m->getMaterial();
string str=to_string(numLights>0?numLights:1);
string str=to_string(root->numLights>0?root->numLights:1);
if(mat){
mat->getShader()->editShader(true,'=',';',str);
//mat->getShader()->editShader(true,'=',';',str);
mat->getShader()->editShader(false,'=',';',str);
}
}