1 2 3 4 5 6 7 8 9 10 11 12 13
#version 330 core layout(location = 0) in ivec3 position; uniform ivec3 viewPoint; out vec4 vworldPos; void main() { vworldPos = vec4(position - viewPoint, 1); }