#version 330 layout (location=0) in vec4 L0; layout (location=1) in vec4 L1; layout (location=2) in vec4 L2; layout (location=3) in vec4 L3; out vec3 mid; out vec3 nor; out vec3 vert0; out vec3 vert1; out float an; out float intra; out vec3 col; uniform vec3 origin = vec3(0); void main(void){ mid = L0.xyz - origin; float blue = 0.0; float red = 0.0; float green = 0.0; blue = fract(L0.w); an = L0.w - blue; nor = L1.xyz; intra = L1.w; vert0 = L2.xyz - origin; vert1 = L3.xyz - origin; red = L2.w; green = L3.w; col = vec3(red, green, blue); //= L5.w; }