2 #extension GL_ARB_shading_language_420pack : require
3 #extension GL_ARB_explicit_attrib_location : require
5 layout(std140, binding=0) uniform ViewBounds
17 layout(location = 0) in vec2 position;
24 vec2 transformed_position;
25 transformed_position.x = (position.x - bounds_x) / bounds_w;
26 transformed_position.y = (position.y - bounds_y) / bounds_h;
27 // Transform to clip coordinates (-1,1, -1,1).
28 gl_Position.x = (transformed_position.x*2) - 1;
29 gl_Position.y = 1 - (transformed_position.y*2);
32 pixsize = vec2(pixel_w/bounds_w, 100*pixel_h/bounds_h);
33 objectid = gl_VertexID / 2;