GLSL: Add p3d_MetallicRoughnessTexture input mapped to M_metallic_roughness

This new M_metallic_roughness enum value is just an alias of M_selector
This commit is contained in:
rdb 2025-12-22 12:43:21 +01:00
parent 975a9fb484
commit 64b98ea813
3 changed files with 6 additions and 1 deletions

View File

@ -13,6 +13,7 @@ This maintenance release fixes some minor defects and stability issues.
* Egg: Add limited forward compatibility for metallic-roughness textures
* OpenGL: fix error blitting depth texture on macOS (#1719)
* OpenGL: fix SSBO support not being detected in certain situations
* GLSL: Add p3d_MetallicRoughnessTexture input mapped to M_metallic_roughness
* X11: Add config variable to enable detection of autorepeat key events (#1735)
* GUI: Fix bug with PGSliderBar dragging (#1722)
* Minor thread safety things for free-threaded Python builds

View File

@ -1015,7 +1015,8 @@ reflect_uniform(int i, char *name_buffer, GLsizei name_buflen) {
else if (noprefix.compare(7, string::npos, "Height") == 0) {
bind._part = Shader::STO_stage_height_i;
}
else if (noprefix.compare(7, string::npos, "Selector") == 0) {
else if (noprefix.compare(7, string::npos, "MetallicRoughness") == 0 ||
noprefix.compare(7, string::npos, "Selector") == 0) {
bind._part = Shader::STO_stage_selector_i;
}
else if (noprefix.compare(7, string::npos, "Gloss") == 0) {

View File

@ -65,6 +65,9 @@ PUBLISHED:
M_normal_gloss,
M_emission,
// Forward compatibility alias.
M_metallic_roughness = M_selector,
};
enum CombineMode {