| bio | website | |
|---|---|---|
| location | Finland | |
| age | 28 | |
| visits | member for | 2 years, 5 months |
| seen | Apr 5 at 8:47 | |
| stats | profile views | 34 |
|
Jan 17 |
awarded | Nice Answer |
|
Jan 17 |
awarded | Yearling |
|
Jan 6 |
awarded | Enlightened |
|
Jan 6 |
awarded | Nice Answer |
|
Feb 22 |
awarded | Notable Question |
|
Dec 27 |
awarded | Yearling |
|
Sep 26 |
awarded | Popular Question |
|
May 30 |
comment |
OpenGL ES 2.0: Perspective Projection for 2D Games Set up a perspection projection matrix and multiply following vectors (representing corners of two quads) with it: (-1,-1,1,1), (1,1,1,1) and (-1000, -1000, 1,1), (-998, -998, 1,1). Now, if you calculate differences between first two vectors and last two vectors (and I mean after projection) you will get the same result, meaning that their areas are equal even after the projection (also, remember to divide projected vectors with their w component). |
|
May 30 |
comment |
OpenGL ES 2.0: Perspective Projection for 2D Games @bunkai: I really don't know about your case but it seems that you are doing something wrong. I'm 100% sure that you should not get any deformation if your sprites are really perpendicular to the camera. And no, you're not viewing them from "slight angle". Here is a simple proof (see next comment): |
|
May 27 |
comment |
OpenGL ES 2.0: Perspective Projection for 2D Games About the maths: You have to find a plane in view frustum with an area equal to the area of viewport. This is very easy to calculate: plane = (1/2)*viewportHeight/tan(verticalFOV/2). Note that if you are using FOV=90 this simplifies to plane = (1/2)*viewportHeight |
|
May 27 |
awarded | Commentator |
|
May 27 |
comment |
OpenGL ES 2.0: Perspective Projection for 2D Games 1) Currently we are not using mipmapping since we are not placing objects very far or very close to camera. Of course we have things like background etc. but we calculate their size so that they are pixel-perfect. However, I don't see any reason why mipmapping couldn't be used. 2) As I mentioned in my answer, geometry does not change if the sprites are facing the camera. In this case they are just like billboards and they will not certainly deform. |
|
May 26 |
revised |
OpenGL ES 2.0: Perspective Projection for 2D Games added 362 characters in body |
|
May 26 |
answered | OpenGL ES 2.0: Perspective Projection for 2D Games |
|
May 23 |
answered | Component based entity system API naming problems |
|
Apr 11 |
comment |
From camera coordinates to world coordinates But that does not mean that view * invView equals identity in shader. That's why I recommended you to check that you have set uniform values correctly to the used effect. If view * invView = I in shader there is no reason why your first case would work and the last one would not. |
|
Apr 11 |
comment |
From camera coordinates to world coordinates Check that you are setting uniform values (view and invView) to the used effect correctly. If the first case you mention works and the last one does not there must be something wrong with uniforms. |
|
Apr 7 |
awarded | Editor |
|
Apr 7 |
revised |
Fastest way to draw quads in OpenGL ES? added 565 characters in body; deleted 2 characters in body; added 4 characters in body |
|
Apr 7 |
answered | Fastest way to draw quads in OpenGL ES? |