mirror of
https://github.com/devZoGok/vb01.git
synced 2026-08-26 19:43:30 +00:00
Revert "animatable textures"
This reverts commit 8226a9479ce8ab45bed5bc6acbba63eaaf0e6330. point light shadows fixed spotlights geometry shaders
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user