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 ...
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 ...
12
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 ...
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-...
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 ...
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 ...
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 ...
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 ...
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 ...
6
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 '...
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, ...
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 ...
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 ...
4
votes
Accepted
What is the difference between a "meshlet" and just a small mesh?
A "meshlet" is a concept built around the specific architecture of how shaders work.
Shaders are invoked in work groups, even when shader stages don't explicitly represent that concept in ...
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):
...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
rasterizer × 65opengl × 11
rendering × 9
raytracing × 7
3d × 5
gpu × 5
interpolation × 5
projections × 4
texture × 3
glsl × 3
transformations × 3
c++ × 3
shading × 3
fragment-shader × 3
clipping × 3
raymarching × 3
algorithm × 2
lighting × 2
perspective × 2
antialiasing × 2
curve × 2
triangulation × 2
voxelization × 2
deferred-rendering × 2
hardware × 2