SPIRV-Cross/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

19 lines
220 B
Plaintext

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