mirror of
https://github.com/godotengine/godot.git
synced 2025-10-20 00:13:30 +00:00
SceneShader compiling
This commit is contained in:
parent
3bb8e6a9fe
commit
2bf8831dd6
10 changed files with 1283 additions and 1886 deletions
|
@ -685,9 +685,13 @@ String ShaderCompiler::_dump_node_code(const SL::Node *p_node, int p_level, Gene
|
|||
}
|
||||
|
||||
vcode += ";\n";
|
||||
|
||||
r_gen_code.stage_globals[STAGE_VERTEX] += "layout(location=" + itos(index) + ") " + interp_mode + "out " + vcode;
|
||||
r_gen_code.stage_globals[STAGE_FRAGMENT] += "layout(location=" + itos(index) + ") " + interp_mode + "in " + vcode;
|
||||
// GLSL ES 3.0 does not allow layout qualifiers for varyings
|
||||
if (!RS::get_singleton()->is_low_end()) {
|
||||
r_gen_code.stage_globals[STAGE_VERTEX] += "layout(location=" + itos(index) + ") ";
|
||||
r_gen_code.stage_globals[STAGE_FRAGMENT] += "layout(location=" + itos(index) + ") ";
|
||||
}
|
||||
r_gen_code.stage_globals[STAGE_VERTEX] += interp_mode + "out " + vcode;
|
||||
r_gen_code.stage_globals[STAGE_FRAGMENT] += interp_mode + "in " + vcode;
|
||||
|
||||
index += inc;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue