mirror of
https://github.com/godotengine/godot.git
synced 2025-11-03 15:11:19 +00:00
Merge pull request #62972 from Chaosus/shader_groups
Implement shader uniform groups/subgroups
This commit is contained in:
commit
2d2b85d400
13 changed files with 298 additions and 8 deletions
|
|
@ -2185,7 +2185,22 @@ void RendererCanvasRenderRD::CanvasShaderData::get_param_list(List<PropertyInfo>
|
|||
}
|
||||
}
|
||||
|
||||
String last_group;
|
||||
for (const KeyValue<int, StringName> &E : order) {
|
||||
String group = uniforms[E.value].group;
|
||||
if (!uniforms[E.value].subgroup.is_empty()) {
|
||||
group += "::" + uniforms[E.value].subgroup;
|
||||
}
|
||||
|
||||
if (group != last_group) {
|
||||
PropertyInfo pi;
|
||||
pi.usage = PROPERTY_USAGE_GROUP;
|
||||
pi.name = group;
|
||||
p_param_list->push_back(pi);
|
||||
|
||||
last_group = group;
|
||||
}
|
||||
|
||||
PropertyInfo pi = ShaderLanguage::uniform_to_property_info(uniforms[E.value]);
|
||||
pi.name = E.value;
|
||||
p_param_list->push_back(pi);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue