uniform mat4 modelproj;
in  vec4 pos;
out vec4 dir;
void main()
{
#if 0
 float     c = floor(pos.w+0.00001);
 vec2      t;
 t.y      = floor(c*0.5);
 t.x      = c-t.y*2.0;
 t        = (t-0.5)*2.0;
 gl_Position = vec4(t.x,t.y,0.5,1.0);
#else
 gl_Position = modelproj*vec4(pos.xyz,1.0);
#endif
 dir.xyz     = pos.xyz;
 dir.w       = fract(pos.w);
}
