mirror of
https://github.com/Redot-Engine/redot-engine.git
synced 2025-12-06 15:21:56 -05:00
Merge commit godotengine/godot@394508d26d
This commit is contained in:
@@ -688,30 +688,14 @@ String ShaderCompiler::_dump_node_code(const SL::Node *p_node, int p_level, Gene
|
||||
vcode += _prestr(varying.precision, ShaderLanguage::is_float_type(varying.type));
|
||||
vcode += _typestr(varying.type);
|
||||
vcode += " " + _mkid(varying_name);
|
||||
uint32_t inc = 1U;
|
||||
uint32_t inc = varying.get_size();
|
||||
|
||||
if (varying.array_size > 0) {
|
||||
inc = (uint32_t)varying.array_size;
|
||||
|
||||
vcode += "[";
|
||||
vcode += itos(varying.array_size);
|
||||
vcode += "]";
|
||||
}
|
||||
|
||||
switch (varying.type) {
|
||||
case SL::TYPE_MAT2:
|
||||
inc *= 2U;
|
||||
break;
|
||||
case SL::TYPE_MAT3:
|
||||
inc *= 3U;
|
||||
break;
|
||||
case SL::TYPE_MAT4:
|
||||
inc *= 4U;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
vcode += ";\n";
|
||||
// GLSL ES 3.0 does not allow layout qualifiers for varyings
|
||||
if (!RS::get_singleton()->is_low_end()) {
|
||||
@@ -1483,6 +1467,7 @@ Error ShaderCompiler::compile(RS::ShaderMode p_mode, const String &p_code, Ident
|
||||
info.render_modes = ShaderTypes::get_singleton()->get_modes(p_mode);
|
||||
info.shader_types = ShaderTypes::get_singleton()->get_types();
|
||||
info.global_shader_uniform_type_func = _get_global_shader_uniform_type;
|
||||
info.base_varying_index = actions.base_varying_index;
|
||||
|
||||
Error err = parser.compile(p_code, info);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user