Merge pull request #7495 from RandomShaper/more-uniform-reuse-fix
More uniform reuse fix (2.1)
This commit is contained in:
commit
fde651ebf8
|
@ -571,17 +571,14 @@ Error ShaderCompilerGLES2::compile_node(SL::ProgramNode *p_program) {
|
||||||
|
|
||||||
global_code+=uline;
|
global_code+=uline;
|
||||||
if (uniforms) {
|
if (uniforms) {
|
||||||
//if (uniforms->has(E->key())) {
|
// Check to avoid uniforms with the same name being re-added to avoid overwriting entries
|
||||||
// //repeated uniform, error
|
if (!uniforms->has(E->key())) {
|
||||||
// ERR_EXPLAIN("Uniform already exists from other shader: "+String(E->key()));
|
|
||||||
// ERR_FAIL_COND_V(uniforms->has(E->key()),ERR_ALREADY_EXISTS);
|
|
||||||
//
|
|
||||||
// }
|
|
||||||
SL::Uniform u = E->get();
|
SL::Uniform u = E->get();
|
||||||
u.order+=ubase;
|
u.order+=ubase;
|
||||||
uniforms->insert(E->key(),u);
|
uniforms->insert(E->key(),u);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for(int i=0;i<p_program->functions.size();i++) {
|
for(int i=0;i<p_program->functions.size();i++) {
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue