Questions tagged [rasterizer]

For questions related to the rasterization process, both in terms of GPU hardware and algorithms related to rasterization.

Filter by
Sorted by
Tagged with
4
votes
1answer
74 views

How to interpolate vertices when clipping?

When we clip in homogeneous clip space, we have to generate a new vertex located at the intersection between the edge and the clip plane. We thus have to interpolate the $(x , y, z , w)$ position of ...
0
votes
0answers
19 views

How to interpolate vertex while clipping in homogeneous clip space?

I want to clip triangles to the near plane, in homogeneous clip space, so for each edge, I have to see if it crossed the near plane. If it has, I linearly interpolate the two endpoints based on the ...
2
votes
0answers
20 views

Deferred Decals

What's the proper of way of calculating the coords to apply decals by let's say linear interpolation? My understanding is that you render your GBuffer albedo, specular, etc... and after that you do ...
0
votes
1answer
44 views

Early depth test in WebGL

I understand that in OpenGL early depth test can be performed in the rasterizer (before running the fragment shader), but is it the same case for WebGL? If so, how is early depth test enabled in WebGL?...
3
votes
1answer
111 views

Interpolation in Graphics Pipeline

I am trying to program my own version of WEBGL graphics pipeline in python, however, I am confused as to where the color interpolation takes place in the pipeline. According to my research, it happens ...
2
votes
1answer
50 views

Y axis inversion in 3D rasterization

What is the correct way to invert the y axis during the 3D projection? I see a lot a people doing: ...
0
votes
0answers
75 views

Projecting one Quadratic Bezier Curve Onto Another

I'm working on improving an open source rasterization library called Gudni that I started a few years ago. It's source repository and the branch I'm currently working on are here: https://github.com/...
0
votes
1answer
51 views

Understanding the near clipping plane

I don't understand something about the near clipping plane. It's there to avoid the division by $0$ but when we compute the pixel coordinates, we just need to multiply by the clipping plane to clip ...
3
votes
1answer
94 views

What is the point of having integer-based draw routines in software rasterizer?

I wonder why all the well known algorithms of drawing for example circles (bresenham, mid-point, etc) all use integer arithmetics? For example, here is a simple circle drawn with bresenham algorithm: ...
0
votes
1answer
62 views

Why is the z direction away from the screen/viewer?

I wonder what is the reason that when z increase, the objects appear far away and when z is negative, the object is behind the camera?
2
votes
1answer
133 views

Rasterizing spheres?

I want to start developing a hybrid renderer: it first applies a rasterizer, then stores for each pixel the surface pointer, normal vector, and distance to the camera. Then it raytraces reflections, ...
1
vote
2answers
117 views

Any good sources on advaced/special rasterization algorithms and techniques and theory behind them?

I spent quite some time looking for books on rasterization of vector graphics and related challenges. The best I found is "Raster Tragedy in Low Resolution",which is old and focused on fonts. There ...
3
votes
1answer
372 views

Iridescence/Thin-film interference integration as a layer

I'm trying to integrate the thin-film interference effect described in the paper "Belcour, L., & Barla, P. (2017). A practical extension to microfacet theory for the modeling of varying ...
3
votes
1answer
665 views

How is lighting done in Rasterization based pipeline?

So I wanted to know how do Game Engines like Unity3D and Unreal do lighting. I'm familiar with Ray-tracing, pathtracing based renderers etc. But not much with rasterization based engines. I do know a ...
2
votes
1answer
169 views

Comprehensive explanation of conservative rasterization algorithm

I am trying to implement conservative voxelization as part of real time GI in my hobby rendering engine. I find this article by NVIDIA. I am stuck at understanding the second algorithm. The problem ...
4
votes
1answer
856 views

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

I'm trying to apply raymarching on top of 3D rasterization, ordering what 3D object gets displayed based on the depth of a rasterization pass and the raymarch depth. After getting the transform ...
1
vote
0answers
96 views

How to guarantee rasterization of triangles in a voxel representation

There are 2 problems i am trying to solve involving rasterization of geometry in 3D. The first is, my 3D texture is created with a top down viewd, so triangles that are perfectly orthogonal to the ...
0
votes
1answer
53 views

How does image resolution change(process involved in calculation), when a screen on phone is rotated?

What is the process involved in calculating the resolution of image to be displayed when the screen of my phone(android) is rotated? My screen resolution is 1920x1080. It displays some videos only in ...
2
votes
1answer
247 views

Light coordinate in Phong shading and Normal interpolation

I'm currently making a small 3D renderer and I got stuck in Phong shading. My questions are: Into which space should the light coordinate be converted? I have my light position at world coordinates (...
4
votes
1answer
509 views

Clipping for perspective projection

In the following two graphs, the red lines are borders of the perspective-projection frustum, the blue lines are to be rasterized, the green lines are perspective-projection lines, which are wrong. ...
4
votes
1answer
236 views

Avoid having an opaque and transparent variant of each pixel shader

Transparency can be achieved (or actually approximated) by using alpha-to-coverage (in case of MSAA) or basic alpha/transparency blending using the following approach: Bind a rasterizer state with a ...
4
votes
2answers
89 views

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

Perspective Camera A (row-major) perspective transformation matrix has the following format: $$\begin{align} \mathrm{T} &= \begin{bmatrix} \mathrm{T}_{00} &0 &0 &0 \\ 0 &\...
15
votes
1answer
3k views

How are mipmap levels computed in Metal?

My question is specifically in regards to Metal, since I don't know if the answer would change for another API. What I believe I understand so far is this: A mipmapped texture has precomputed "...
5
votes
1answer
161 views

Polygons versus curve primitives in software rendering

Most 3D video games since the nineties have used hardware rendering based on polygons. Why polygons? They work well for some things, but not so well for others, e.g. a human figure rendered in ...
1
vote
2answers
472 views

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

The biggest bottleneck of my code is fetching texture RGB values from memory. My code looks something like this: ...
5
votes
1answer
4k views

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

It makes use of tables, buckets, and sorting, which all seem unnecessary. I don't understand why I can't just fill between pairs of scan line intersections, ignoring vertices and edges with gradient ...
7
votes
1answer
783 views

Subsurface Scattering Without Rays?

Some games claim to use subsurface scattering but my current understanding of sss is only achieved with ray tracing. How would you sub surface scatter without ray tracing? Do some claim to use sss but ...
2
votes
0answers
76 views

Artifacts (numerical errors?) in rasterisation renderer

This might be not laser precision question but this issue appeared a long time ago when first trying to render some scene with 3D models in rasterisation renderer and apply some lighting, ...
4
votes
1answer
361 views

Z buffer working in OpenGL

After Z-Buffer Testing does the fragment shader run on the discarded fragments? Does the Z-Test happen after the fragment shader runs? Please, tell me the step by step events that occur in the Z-Test....
1
vote
1answer
324 views

Particle & Fluid Simulation: Where to learn? [closed]

Where can I learn about particle and fluid simulation? Is there a good book available? I want to couple volume rendering with fluid/particle simulation to be able to finally render smoke and ocean ...
4
votes
3answers
4k views

Mirror Reflections: Ray Tracing or Rasterisation?

Are mirror-like reflections in computer graphics purely handled with ray-tracing/ray-casting techniques or are there some situations where they are achieved through rasterisation?
4
votes
1answer
664 views

Screen coordinates, barycentric coordinates and global coordinateas

To continue with this my other question, here's the problem. So, I've a slide, which I'm trying to understand. Here are my questions. What are the barycentric coordinates of? From my previous ...
4
votes
1answer
142 views

Projected points and screen coordinates

I'm trying to understand part of the contents of a slide, but I'm not really understanding. So, here's the interested part. I've a few questions. Are the projected points $q_1$ and $q_2$ the points ...
2
votes
2answers
110 views

Points of a line given in global coordinates to calculate the pixels that are set using the midpoint algorithm without anti-aliasing

I've the following problem: Let the camera opening angle be $\frac{3}{4}\pi$ and the window be $15 \times 15$ pixels large. Which pixels does the midpoint algorithm (without anti-aliasing) set for ...
4
votes
1answer
260 views

Non-Polygonal 3D cube rasterization

Given a cube defined as: struct Cube { float min[3]; float size; }; What would be the fastest rasterization method? On the internet I only found methods ...
5
votes
1answer
197 views

How to rasterize a line when the background color is not always white?

I've to rasterize a line taking into account not only the background color of the screen, which is white, but also the color of other objects in the scene. In my case, I've just another object, a ...
14
votes
1answer
2k views

Why do GPUs still have rasterizers?

Despite advancements modern GPUs still have fixed rasterizers. Highly customizable, with programmable shaders but nevertheless not fully programmable. Why is that? Why can't GPUs be simply massively ...
7
votes
1answer
184 views

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

It is pretty well known that writing depth in your fragment shader generally disables "early Z" test/write optimizations that modern GPUs rely on for fastness. Nonetheless, APIs still allow it and ...
3
votes
2answers
238 views

Is there a performance implication if the frame buffer resolution and the physical screen resolution are different?

I was under the impression that the frame buffer resolution always has to be the same as the physical screen resolution, so changing the software resolution settings would not affect rasterization. ...
11
votes
1answer
829 views

Why do adjacent triangles never overlap when rasterized?

Apologies for the following noob question, it's just I can't find a satisfactory answer anywhere... When I render a simple axis-aligned quad made up of two triangles, I don't understand why there's ...
4
votes
0answers
126 views

Polygon Filling rule - even odd OR orientation of the normal

I am going through some ideas that slice a 3D model and fill the area of the resulting polygon contour . Currently they are using the following concepts as follows: Every resulting line of the ...
9
votes
1answer
391 views

What are sample gaps during scan conversion?

In this tutorial, It is very often the case that triangles are rendered that share edges. OpenGL offers a guarantee that, so long as the shared edge vertex positions are identical, there will be no ...
3
votes
2answers
332 views

Double rasterization work on triangles edges.

I know that fragments are rasterized in a 2x2 quad. That's why the seam between two triangles can be rasterized twice. At least that article states this. I wonder is it still true today on modern ...