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
0
votes
0answers
41 views

How widespread are T-vertex artifacts nowadays?

As far as I know, OpenGL specifies that you cannot rely on precise rounding of vertex and edge coordinates for rasterization - which means that T-vertices may cause small artifacts: a continuous and a ...
1
vote
1answer
50 views

Why are degenerate triangles rasterized when using GL_LINE polygon mode

I have made use of degenerate triangles when rendering a mesh. While the degenerate triangles are not rasterized when using GL_FILL polygon mode, they are when I do ...
6
votes
3answers
741 views

Fundamental drawbacks of rasterization over ray tracing

Are there any fundamental drawbacks/limitations of rasterization as compared to ray-tracing? When I search on the internet, I get vague explanations like rasterization does not provide lighting ...
0
votes
1answer
115 views

gl_ClipDistance vs gl_CullDistance

Why are there very similar yet distinct arrays: gl_ClipDistance[] vs gl_CullDistance[]? What would be some use cases where the ...
0
votes
0answers
48 views

Combining two images based on their depth maps

Lets assume, we have two depth maps with us and their corresponding color maps. Now, our task is to populate a final image that will be displayed. Each pixel in the final image needs to be calculated ...
1
vote
2answers
87 views

Rasterization: How does hardware disambiguate identical Z values at silhouette edges?

I have written a software rasterizer, and have encountered a (literal) edge case. At the silhouette edge of a typical object, you have two triangles—the front face and the back face. They are not ...
0
votes
0answers
45 views

Compute UV Normals and World Position from a given texture coordinate

I'm turning to you as a newbie in CG, with a question that might easily be answerable for pros. What I need to do is the following: I have a (rather simple) quad mesh in a 3D modelling software, say, ...
1
vote
1answer
144 views

Rotating a Bitmap

I would like to rotate an bitmap image using math. I have two issues with my current implementation: the pixel-by-pixel rotation of the copied bitmap is extremely slow and it is leaving gaps between ...
1
vote
1answer
123 views

Rendering a particle system as a smooth blob

What is a good algorithm for rendering a particle system as a coherent mesh, in realtime? I am running a smoothed-particle hydrodynamics fluid simulation, and I would like to render the particles not ...
3
votes
1answer
140 views

Efficient methods to rasterize a scene of connected triangles

Assuming I wanted to rasterize a scene of triangles that are all connected that is similar to the image below, what would be an efficient way to do it on a GPU and a CPU? The triangles can be of any ...
4
votes
1answer
125 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 ...
2
votes
0answers
38 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
210 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
355 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
79 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
115 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
131 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
127 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
119 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
236 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
158 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
558 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
1k 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
213 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
1k 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 ...
0
votes
0answers
114 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 ...
-1
votes
1answer
63 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 ...
1
vote
1answer
320 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
636 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
272 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 ...
3
votes
2answers
98 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 &\...
16
votes
1answer
4k 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 "...
4
votes
1answer
217 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 ...
2
votes
2answers
625 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: ...
6
votes
1answer
6k 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
917 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
88 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
376 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....
0
votes
1answer
331 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 ...
5
votes
3answers
5k 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
808 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
178 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
141 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
343 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
221 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
3k 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
218 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
472 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
947 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
142 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 ...