22 votes
Accepted

How are mipmap levels computed in Metal?

Mip selection is pretty well standardized across devices today—with the exception of some of the nitty-gritty details of anisotropic filtering, which is still up to the individual GPU manufacturers to ...
user avatar
  • 23.6k
15 votes
Accepted

Why do GPUs still have rasterizers?

In short, performance reasons are why they aren't programmable. History and Market In the past, there used to be separate cores for vertex and fragment processors to avoid bloated FPU designs. There ...
user avatar
  • 1,323
11 votes
Accepted

Mirror Reflections: Ray Tracing or Rasterisation?

There are a couple of special cases where mirror-like reflections can be rendered efficiently using rasterization techniques, and these are commonly used in games, although they don't work for the ...
user avatar
  • 23.6k
10 votes
Accepted

What modern real-time rendering applications still use fragment shader depth writes / late-Z?

Any techniques that involve raytracing in the fragment shader might want to write Z in order that the depth buffer contain an accurate representation of the raytraced surface. For example: Distance-...
user avatar
  • 23.6k
10 votes
Accepted

Why do adjacent triangles never overlap when rasterized?

This is the same problem as discussed in What are sample gaps during scan conversion? Briefly, rasterisation - at least with the majority of hardware systems - tests at a single 'infinitesimal' point ...
user avatar
  • 3,941
8 votes
Accepted

What are sample gaps during scan conversion?

Sample gaps will occur if you don't do things "properly". In OpenGL or D3D, assuming a consistent winding order, if you have triangles ABC and CBD, then when a sample point - that is a test during ...
user avatar
  • 3,941
8 votes
Accepted

Why is the scan line filling algorithm so seemingly over complicated?

The scan-line algorithm (as described on Wikipedia for instance) is concerned with generating the pixels in order, left-to-right and top-to-bottom, with each pixel needing to be touched only once. It ...
user avatar
  • 23.6k
8 votes
Accepted

Subsurface Scattering Without Rays?

There are lots of ways to fake SSS with greater or lesser fidelity. A few recent-ish methods: Screen-space blurring of object lighting (described in detail here) Using “interior” ambient-occlusion ...
user avatar
8 votes

Fundamental drawbacks of rasterization over ray tracing

Rasterization is based on the idea of projecting various primitives (e.g. triangles, line segments, points, quads, maybe even some curved surfaces like bezier patches) on the screen and then ...
user avatar
  • 1,838
5 votes

Projected points and screen coordinates

It's not 100% clear what the author means here, but I'll choose to interpret "screen coordinates" as "pixel coordinates". These would be related to the projected points by a 2D coordinate ...
user avatar
  • 23.6k
5 votes

How to use multithreading in 3D software renderer to speed up fetching texture values

It could be that you have to overcome a different bottleneck first. Have you ever read Jim Blinn's "The Truth About Texture Mapping"? (I had a quick search to see if I could find a non-paywalled ...
user avatar
  • 3,941
5 votes
Accepted

Comprehensive explanation of conservative rasterization algorithm

I'm not sure what exactly you mean by how to visualize a plane that use w value as one of this coordinates but here's a sketch that will, hopefully, clarify this sentence: a line through each ...
user avatar
  • 66
5 votes
Accepted

Efficient methods to rasterize a scene of connected triangles

It's an interesting question, because the advice changes over time. Having said that: On a GPU, by far the most efficient way, as Nathan Reed said in the comment, is to use the rasterisation hardware ...
user avatar
  • 761
5 votes
Accepted

Fundamental drawbacks of rasterization over ray tracing

It is generally not so much about the fact that rasterisation couldn't do the things. It probably could, but it would most likely need several rendering passes and all kinds of dirty tricks to ...
user avatar
  • 8,169
4 votes
Accepted

Z buffer working in OpenGL

When depth testing is enabled, the testing occurs after the fragment shader executes. The procedure is relatively simple (and spelled out pretty well here): Get depth of fragment Test against depth ...
user avatar
  • 1,323
4 votes
Accepted

Supporting multiple camera types in a deferred renderer without specializing the shaders or in the shaders

Projective transformations (represented by 4×4 projection matrices) are invertible. You can go from NDC coordinates back to view space using the inverse of the projection matrix, in the same way that ...
user avatar
  • 23.6k
4 votes

Double rasterization work on triangles edges.

That's why the seam between two triangles can be rasterized twice. The seam won't be rasterized twice because of the OpenGL or D3D fill/rasterisation rules. What I think Humus is alluding to is ...
user avatar
  • 3,941
4 votes
Accepted

How to align Ray Marching on top of traditional 3D rasterization?

The problem, I think, is that you are comparing two different kinds of depth values. For want of better terms, the rasterizer's depth buffer stores 'parallel' depth, whereas raymarching calculates '...
user avatar
  • 2,302
4 votes
Accepted

How is lighting done in Rasterization based pipeline?

I'm guessing Rasterization based pipelines use the same procedure for shading i.e. A ray is shot from the pixel and then from the triangle that got projected on that pixel to the light source? Close, ...
user avatar
  • 6,450
4 votes
Accepted

Why are degenerate triangles rasterized when using GL_LINE polygon mode

I assume you're talking about triangles with two vertices equal, and a third vertex at a different point. They don't appear in filled polygon mode because such triangles have zero area and don't cover ...
user avatar
  • 23.6k
4 votes
Accepted

Can meshes be reused in raytracing?

Example code tends to be bad code from a performance (or even software engineering) standpoint because... it's an example. Its primary purpose is to make it clear how to do a thing, not to do it in an ...
user avatar
  • 8,101
3 votes
Accepted

Avoid having an opaque and transparent variant of each pixel shader

You can use a threshold set through a constant buffer to clip pixels (ie an alpha test): ...
user avatar
  • 23.6k
3 votes
Accepted

Polygons versus curve primitives in software rendering

Most software rendering engines dice the parametric primitives to micropolygons, usually on the fly as needed. In essence this reduces the needed complexity to determine intersections. The surface ...
user avatar
  • 8,169
3 votes

Mirror Reflections: Ray Tracing or Rasterisation?

You can mimic a mirror by masking out the visible reflective surface when you first render and then mirror the world around the reflective plane and render again while only drawing where the ...
user avatar
3 votes

Mirror Reflections: Ray Tracing or Rasterisation?

This is one of the most common "misconceptions" on rendering, rasterisation and ray-tracing. Don't get me wrong. This is a good question, but one that should be answered once and for all. So to ...
user avatar
  • 656
3 votes
Accepted

Double rasterization work on triangles edges.

It is true to on today's GPUs, unless one or more vendors has implemented a technique such as this: http://graphics.stanford.edu/papers/fragmerging/shade_sig10.pdf To clarify, rasterization is not ...
user avatar
3 votes

Non-Polygonal 3D cube rasterization

Since the cube is a convex object, you could first find the silhouette edges of the cube, by using dot product between cube face normals & view vectors. Then you can sort the edges by the smallest ...
user avatar
  • 3,556
3 votes
Accepted

Iridescence/Thin-film interference integration as a layer

Unfortunately, the iridescence model is not made to be applied to a diffuse term. Pascal and I made it for microfacet models only (that is the specular term). One way to understand how to include it ...
user avatar
3 votes
Accepted

Rendering a particle system as a smooth blob

For culling faraway particles: as lightxbulb said, the keyword to search for is "acceleration structure". There are a variety of options: BVH, octree, kd-tree, uniform grid, or some ...
user avatar
  • 23.6k
3 votes

Fundamental drawbacks of rasterization over ray tracing

Since we're comparing against ray-tracing, let's assume the argument is restricted to 3D rendering based (at least somewhat) on real physics. A comparison of ray-tracing and rasterization at a high ...
user avatar

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