Fix Realtime Compositor: Broken keying node on MacOS
This was caused by `mod` not being available to integer types. It isn't part of the GLSL stadard officially. In this particular case, it is not needed. so replace it with the `%` operator.
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
ivec3 compute_saturation_indices(vec3 v)
|
||||
{
|
||||
int index_of_max = ((v.x > v.y) ? ((v.x > v.z) ? 0 : 2) : ((v.y > v.z) ? 1 : 2));
|
||||
ivec2 other_indices = ivec2(mod(ivec2(index_of_max) + ivec2(1, 2), ivec2(3)));
|
||||
ivec2 other_indices = (ivec2(index_of_max) + ivec2(1, 2)) % 3;
|
||||
int min_index = min(other_indices.x, other_indices.y);
|
||||
int max_index = max(other_indices.x, other_indices.y);
|
||||
return ivec3(index_of_max, max_index, min_index);
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
ivec3 compute_saturation_indices(vec3 v)
|
||||
{
|
||||
int index_of_max = ((v.x > v.y) ? ((v.x > v.z) ? 0 : 2) : ((v.y > v.z) ? 1 : 2));
|
||||
ivec2 other_indices = ivec2(mod(ivec2(index_of_max) + ivec2(1, 2), ivec2(3)));
|
||||
ivec2 other_indices = (ivec2(index_of_max) + ivec2(1, 2)) % 3;
|
||||
int min_index = min(other_indices.x, other_indices.y);
|
||||
int max_index = max(other_indices.x, other_indices.y);
|
||||
return ivec3(index_of_max, max_index, min_index);
|
||||
|
||||
Reference in New Issue
Block a user