|
|
|
@ -80,20 +80,20 @@ void main() {
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
// apply view's origin transformation
|
|
|
|
|
//gl_Position.xyz += offst.xyz;
|
|
|
|
|
//gl_Position.xyz += cam_orig.xyz;
|
|
|
|
|
gl_Position *= view_orig;
|
|
|
|
|
|
|
|
|
|
// apply view's xz rotation
|
|
|
|
|
//mat2 xz_rot;
|
|
|
|
|
//xz_rot[0] = vec2(cos(offst.w), -sin(offst.w));
|
|
|
|
|
//xz_rot[1] = vec2(sin(offst.w), cos(offst.w));
|
|
|
|
|
//xz_rot[0] = vec2(cos(cam_rot.y), -sin(cam_rot.y));
|
|
|
|
|
//xz_rot[1] = vec2(sin(cam_rot.y), cos(cam_rot.y));
|
|
|
|
|
//gl_Position.xz *= inverse(xz_rot);
|
|
|
|
|
gl_Position *= view_rot_xz;
|
|
|
|
|
|
|
|
|
|
// apply view's yz rotation
|
|
|
|
|
//mat2 yz_rot;
|
|
|
|
|
//yz_rot[0] = vec2(cos(data[3].w), -sin(data[3].w));
|
|
|
|
|
//yz_rot[1] = vec2(sin(data[3].w), cos(data[3].w));
|
|
|
|
|
//yz_rot[0] = vec2(cos(cam_rot.x), -sin(cam_rot.x));
|
|
|
|
|
//yz_rot[1] = vec2(sin(cam_rot.x), cos(cam_rot.x));
|
|
|
|
|
//gl_Position.yz *= inverse(yz_rot);
|
|
|
|
|
gl_Position *= view_rot_yz;
|
|
|
|
|
|
|
|
|
|