opengl es - Translate ortographic to perspective -
i have 2 points describe line, problem know coordinates of 1 orthographic matrix (ie 150x250x0), , coordinates second perspective matrix (0.5x0.5x20.0f). translate orthographic coordinates perspective can draw line using glsl shader :). how accomplish task?
you need move 1 of vertices other matrix space. example let's move 150x250x0 orthographic perspective space. need transform vertex inverted orthographic matrix. don't know math library use, maybe has function matrix inversion. otherwise use code link: http://www.gamedev.net/topic/180189-matrix-inverse/ . after step vertex in world space.
ps: matrix inversion takes significant time calculations. if can track trasformations steps (translation, rotation , scale) easier way should invert these steps separately , compose matrix after that.
Comments
Post a Comment