Skip to main content
9 votes
Accepted

Parallelism in GPU's rasterization process

Different GPUs use different tricks and techniques so this answer will intentionally be very generic and some detail may not apply to some GPUs, past, present (2017), and future. This mostly applies ...
Stephane Hockenhull's user avatar
3 votes

How do you draw a straight line between two points in a bitmap?

Here is an extremely simple way of drawing lines. The function can easily be changed to be used in projects. ...
cppxor2arr's user avatar
3 votes
Accepted

How to draw a smoother solid-fill circle?

The midpoint circle algorithm calculates a raster path by selecting pixels which are as close as possible to solutions of \$x^2 + y^2 = r^2\$. At each step, the path is extended by choosing the ...
Pikalek's user avatar
  • 13.3k
2 votes
Accepted

Why does my triangle rasterization miss some pixels along one edge?

Turns out I needed to fully calculate the Gamma, instead of doing that shortcut. That solved the issue!
Joe's user avatar
  • 31
2 votes

Why is the depth test not done on geometry before rasterization?

You can determine if a triangle is behind another triangle. However, that's not the operation you would need to do if you wanted to do culling at the triangle level. You would have to determine if ...
Cort Ammon's user avatar
  • 1,247
2 votes

Details of what GPU actually do when clipping in 4D homogeneous space?

Clipping is done in 3D space before 'w' division, not in 4D space. The GPU finds either just the near and far planes, or all 6 3D planes of the view frustum and clip the Geo to this. If w division ...
Stephane Hockenhull's user avatar
2 votes
Accepted

Opengl in 500 lines point in triangle question

If I understand if you have P = A + uAB + vAC and you substract P on both sides then you get ...
furas's user avatar
  • 202
2 votes
Accepted

Raster Graphics vs Vector graphics

Memory isn't that much of an issue as it was in the 90s. The SEGA Mega Drive had only 64 kB of RAM and another 64 kB of VRAM. Yes, KILObyte. And it rendered at 256x224 pixels at the lowest resolution ...
Philipp's user avatar
  • 123k
2 votes

Raster Graphics vs Vector graphics

One can think of 3D graphics as being vector. After all, despite the internal "3D World", they are still vertices and vectors, just with some fancy textures and lighting/shaders thrown on ...
Kromster's user avatar
  • 10.7k
2 votes
Accepted

Why do I see a wireframe when rendering with conservative rasterization and disabled Z writes?

Conservative rasterization draws to every pixel the triangle even just slightly touches, including a range of uncertainty around the outside to account for rounding/snapping. That means there's an ...
LudoProf's user avatar
  • 751
1 vote
Accepted

How do I implement floors and ceilings properly to my DOOM Style Renderer?

Problem was solved easily, but with a lot of wasted time thinking about how. The solution lies with logic: if the walls within the sector are either backfacing or not if you are outside of it, then ...
DehGoose's user avatar
1 vote

How to draw a smoother solid-fill circle?

If you think of the circle as a cone passing through the screen, with the point being in the center of the circle, you can reformulate it in a way that's pretty easy to code. The distance from the ...
user1118321's user avatar
  • 2,642
1 vote

Barycentric coordinates outputting coordinate outside of triangle

It looks to me like you've taken a Barycentric coordinate function designed for determining the coordinates of a point known to be inside the triangle. It does not account for the way the sign of the ...
DMGregory's user avatar
  • 140k
1 vote
Accepted

Geometric clipping of triangles intersecting near plane

why we can't just interpolate our z values to test if the point is behind or in front of the near plane? Because a vertex that's behind the near plane might be behind the camera entirely. That means ...
DMGregory's user avatar
  • 140k
1 vote

How can I draw filled triangles in C++?

A relatively fast algorithm in pseudocode: ...
Michael Flint's user avatar
1 vote
Accepted

How can I draw filled triangles in C++?

There's plenty of different rasterization algorithms, but many articles you find these days are optimized for systems with fast floating point math. For your use case, the ones on this page would ...
Ilmo Euro's user avatar
  • 176

Only top scored, non community-wiki answers of a minimum length are eligible