SPIRV-Cross/reference/shaders/comp/scalar-std450-distance-length-normalize.comp
Hans-Kristian Arntzen ff87419607 Deal with scalar input values for distance/length/normalize.
HLSL and MSL don't support it, so fall back to simpler intrinsics.
2019-06-28 11:20:14 +02:00

20 lines
296 B
Plaintext

#version 450
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
layout(binding = 0, std430) buffer SSBO
{
float a;
float b;
float c;
float d;
float e;
} _9;
void main()
{
_9.c = distance(_9.a, _9.b);
_9.d = length(_9.a);
_9.e = normalize(_9.a);
}