void reflex(float *a_matrix, float a_x, float a_y, float a_z)
{ //Apply the matrix rotation to the point //Requires a custom matrix library //You must handle the modelview matrix by yourself vector_matrix_mul(a_x, a_y, a_z, a_matrix); //Apply the reflex lens formula a_z=a_z - ((((a_x) * (a_x)) + ((a_y)*(a_y)))*0.05f); //The 0.05f = Lens curvature //PSP screen stretch/skew a_x*=1.25f; a_y*=1.05f; //Draw the vertex (passes it to be handled by the projection matrix) glVertex3f(a_x, a_y, a_z);
}