Fix: Sun Beams shader does not work on Metal
Metal does not support the length function on integer vectors, so explicitly cast to a float one.
This commit is contained in:
parent
c9221323f2
commit
75b519eb89
|
@ -16,7 +16,7 @@ void main()
|
|||
* pixels along the integration path. Assume a minimum number of steps of 1 to avoid zero
|
||||
* division handling and return source pixels as is. */
|
||||
float integration_length = min(distance_to_source, max_ray_length);
|
||||
float integration_length_in_pixels = length(input_size) * integration_length;
|
||||
float integration_length_in_pixels = length(vec2(input_size)) * integration_length;
|
||||
int steps = max(1, int(integration_length_in_pixels));
|
||||
vec2 step_vector = (direction_to_source * integration_length) / steps;
|
||||
|
||||
|
|
Loading…
Reference in New Issue