-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Description
when drawing background texture, how does its orthographic projection matrix computed?
it gave as below
static const GLfloat proj[] =
{
0, -2.f/w, 0, 0,
-2.f/h, 0, 0, 0,
0, 0, 1, 0,
1, 1, 0, 1
};
but I found the orthographic projection matrix has the structure like this: https://www.scratchapixel.com/lessons/3d-basic-rendering/perspective-and-orthographic-projection-matrix/orthographic-projection-matrix
[
2/(r-l) 0 0 -(r+l)/(r-l)
0 2/(t-b) 0 -(t+b)/(t-b)
0 0 -2/(f-n) -(f+n)/(f-n)
0 0 0 1
]
Metadata
Metadata
Assignees
Labels
No labels