Fix: EEVEE materials with three closures render black on MacOS
somehow the compiler is struggling with `default:` in `switch`, even if it's never reached. This fixes the discrepancy in the `principled emission alpha` test. Pull Request: https://projects.blender.org/blender/blender/pulls/124889
This commit is contained in:
@@ -34,7 +34,6 @@ float g_closure_rand[CLOSURE_BIN_COUNT];
|
||||
ClosureUndetermined g_closure_get(int i)
|
||||
{
|
||||
switch (i) {
|
||||
default:
|
||||
case 0:
|
||||
return g_closure_bins[0];
|
||||
#if CLOSURE_BIN_COUNT > 1
|
||||
@@ -46,6 +45,9 @@ ClosureUndetermined g_closure_get(int i)
|
||||
return g_closure_bins[2];
|
||||
#endif
|
||||
}
|
||||
/* TODO: this should be unreachable, better to have an assert. */
|
||||
ClosureUndetermined cl_empty;
|
||||
return cl_empty;
|
||||
}
|
||||
|
||||
ClosureUndetermined g_closure_get_resolved(int i, float weight_fac)
|
||||
|
||||
Reference in New Issue
Block a user