Fix T102773 & T102777: Regressions in GPU Subdivision

Introduced in D16420.
SHADER_BUFFER_TRIS and SHADER_BUFFER_TRIS_MULTIPLE_MATERIALS flags were accidentally swapped.
This commit is contained in:
Miguel Pozo 2022-11-27 14:40:00 +01:00
parent b0bcdcdbef
commit 41733a9c08
Notes: blender-bot 2023-11-20 12:14:32 +01:00
Referenced by issue #102773, Regression: Scrambled assigned materials with Subdivision modifier levels
1 changed files with 2 additions and 2 deletions

View File

@ -289,11 +289,11 @@ static GPUShader *get_subdiv_shader(int shader_type)
if (ELEM(shader_type,
SHADER_BUFFER_LINES,
SHADER_BUFFER_LNOR,
SHADER_BUFFER_TRIS,
SHADER_BUFFER_TRIS_MULTIPLE_MATERIALS,
SHADER_BUFFER_UV_STRETCH_AREA)) {
defines = "#define SUBDIV_POLYGON_OFFSET\n";
}
else if (shader_type == SHADER_BUFFER_TRIS_MULTIPLE_MATERIALS) {
else if (shader_type == SHADER_BUFFER_TRIS) {
defines =
"#define SUBDIV_POLYGON_OFFSET\n"
"#define SINGLE_MATERIAL\n";