Most Popular
1500 questions
3
votes
1 answer
Interlacing vertex buffer data with extra efficiency
I am making a 2d game in opengl es 2.0
Inside are tons of rectangles defined by 4 points and one 4 component color.
I am using vertex buffer objects, and I have heard that it is efficent to interlace the data.
So like traditionally you would…

J.Doe
- 1,445
- 12
- 23
3
votes
1 answer
Unwinding an image on a spiral to make it long and flat
Here's an odd intellectual puzzle. Something I was daydreaming about on a train - but the maths are somewhat beyond me. How would someone go about un-winding a spiral to produce a long flat image? Like a rope on a spool, I'd want to uncoil the…

headbanger
- 139
- 2
3
votes
1 answer
Calculate vanishing point
In perspective projection, group of parallel lines have the same vanishing point. I am interesting about the reverse calculation: Getting the group of parallel lines equations that their vanishing point specific point.
Say I know that the camera is…

nrofis
- 177
- 2
- 8
3
votes
2 answers
3D rotation matrix around vector
I am using matrix for performing 3D rotations. I know that in 3D space the matrix product order is important - changing the order of the matrices can effect the rotate result.
So I am interesting about how can I create a rotate matrix that perform…

nrofis
- 177
- 2
- 8
3
votes
0 answers
Bilinear Transformation not working
I implemented this algorithm to fit given image to specified quadrilateral but the output is blank.
I implemented it in C# as follows
Bitmap inputImage = new Bitmap("D:\\Image\\A2.jpg");
Bitmap outputBitmap = new Bitmap(inputImage.Width,…

Sandiip
- 173
- 6
3
votes
2 answers
How are hard and soft shadows cast?
I have been studying computer graphics, from the book Fundamentals of Computer Graphic (but the third edition), and I lastly read about texture mapping and shadow maps. Though, I didn't exactly understand how they function. I know there is also…

phong
- 265
- 1
- 2
- 6
3
votes
1 answer
Finding the maximum number of disconnected fragments
In a plane, we have a convex polygon with n sides. What would be the maximum number of disconnected pieces / fragments if this polygon is clipped against a square?

Sharmishtha
- 63
- 2
3
votes
1 answer
Affine Transformation
We have a matrix
$$\begin{bmatrix} a_{11} & a_{12} & a_{13} \\ a_{21} & a_{22} & a_{23} \\ a_{31} & a_{32} & a_{33} \end{bmatrix}$$
This matrix represents a transformation in homogeneous coordinates.
My question is whether the above matrix is…

Sharmishtha
- 63
- 2
3
votes
2 answers
Line segments overlapping
I have implemented line segments intersetion test and at the very same test I want to include the fact that if two line segments overlap each other partially or fully , it will be flagged as no intersection.
Some hint to it would be great to have!

sajis997
- 1,279
- 1
- 10
- 15
3
votes
0 answers
Can't render multiple VAO's?
I'm a newbie to OpenGL and I was following a series by "thebennybox" on Youtube. Specifically his series on modern opengl programming. I thought I would try to implement his Mesh wrapper using the vector in C++ rather than using arrays of data and…

Jonathon Blow
- 31
- 1
3
votes
1 answer
How to blend World Space Normals
I am trying to blend two world space normals inside a shader. One comes from a tangent space normal map converted into world space using a classic TBN matrix and the other one is a mesh normal map in world space.
I found some interesting resources…

MaT
- 1,229
- 10
- 21
3
votes
1 answer
Ray-tracing the Cornell Box results in really inconsistent image
So I have a vector of glm::vec3 containing the triangles for the classic Cornell Box called triangles. The Draw method casts a ray for each pixel on the screen and calls ClosestIntersection which returns true or false and updates a struct containing…

swedish_fisk
- 33
- 2
3
votes
0 answers
Strange behaviour of glDisableVertexAttribArray() on devices
In my graphics engine, based on OpenGL ES 2.0 I am using standardized name for shader attributes like it is done in libGDX (such as a_position, a_normal, etc.).
When 'activating' my vertex buffer for drawing, just before I call…

Netherwire
- 275
- 2
- 6
3
votes
1 answer
A question about derivation in oblique view frustum
Problem Description:
Reference:
Oblique View Frustum Depth Projection and Clipping
"Mathematics for 3D Game Programming and Computer Graphics" 3rd edition, chapter 5.6.
M is the original projection matrix.
Plane C is the modified near plane, and…

zombielei
- 121
- 1
- 3
3
votes
0 answers
Template matching subpixel accuracy
I use template matching to detect a specific pattern in image.The shift determined is very shaky. Currently I apply it to R,G,B channel separately and average the result to obtain float values.Please, suggest how to obtain subpixel accuracy. I was…

Nikita Chopra
- 131
- 1