Fix function using same local variable name as output variable

This may fix issues with certain compiler.
This commit is contained in:
Clément Foucault 2018-10-19 15:06:08 +02:00
parent eaa527f694
commit 905921d2b5
Notes: blender-bot 2023-02-14 06:00:46 +01:00
Referenced by issue #57296, Blender 2.8 crash on startup on Linux
1 changed files with 5 additions and 5 deletions

View File

@ -50,11 +50,11 @@ vec3 get_barycentric(bvec3 do_edge, const int v)
int v_n = v;
int v_n1 = (v + 1) % 3;
int v_n2 = (v + 2) % 3;
vec3 barycentric;
barycentric[v_n] = do_edge[v_n] ? 0.0 : 1.0;
barycentric[v_n1] = 1.0;
barycentric[v_n2] = do_edge[v_n2] ? 0.0 : 1.0;
return barycentric;
vec3 bary;
bary[v_n] = do_edge[v_n] ? 0.0 : 1.0;
bary[v_n1] = 1.0;
bary[v_n2] = do_edge[v_n2] ? 0.0 : 1.0;
return bary;
}
void main(void)