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
1 vote
0 answers
20 views

Help understanding Texture2D multi-sampling semantics: Why do we need sample index AND location?

Looking at the windows HLSL documentation for Texture2DMS.Load found here: https://learn.microsoft.com/en-us/windows/win32/direct3dhlsl/texture2dms-load can someone help me better understand different ...
Dan's user avatar
  • 11
0 votes
0 answers
25 views

re-writing the rasterizer of a pipeline

I have designed my graphics pipeline, actually similar to what exists now, you know, vertex shader, then rasterizer, interpolation, fragment shader and so on. But, some stuff are changed in my ...
maziar's user avatar
  • 1
0 votes
1 answer
62 views

Patchy patterned artefacting in depth buffer

I am writing a polygon rasterization renderer. Some meshes render flawlessly, but some produce strange artefacts in the depth buffer. These artefacts do not just appear when I save the depth buffer ...
sunsigil's user avatar
0 votes
1 answer
69 views

Triangle Rasterization Shaking Issues

I am making a Software renderer, and I noticed that there is a screen shaking like effect happening. shown in the first video: I tried doing filling without clipping against the small square, and the ...
Serilena's user avatar
3 votes
0 answers
82 views

I need to implement a CPU Rasterizer but am unsure how to parallelize rasterization

I have a rendering engine that has CPU path tracing support, as well as GPU (Vulkan) rasterization and path tracing support. It uses a rasterization pre-processing step to identify the resolution of ...
Chris Gnam's user avatar
4 votes
2 answers
557 views

What is the difference between a "meshlet" and just a small mesh?

Obviously, conceptually, a meshlet is just a small mesh. But what is the reason for making the distinction then? I'm assuming it has to do with how they are implemented. In a meshlet architecture, ...
Chris Gnam's user avatar
2 votes
1 answer
66 views

Trouble transforming vectors from view space to screen space using a perspective projection matrix

I can't for the life of me figure out how to use a perspective projection matrix. My understanding is that, once objects are in view space, the the perspective transform uses the z-coordinate to ...
John Gietzen's user avatar
2 votes
1 answer
41 views

What does "rendering a surface shaded with vertex positions" mean?

I am a newbie in Computer graphics and trying to implement Dynamic Fusion following the paper. I can understand most of the paper, but there is this line bothering me "rendering the warped ...
Trong-Thang Pham's user avatar
1 vote
1 answer
65 views

Unexpected behavior when polygon goes off the side of the camera

I've been trying to make a simple rasterizer in JS, and it's working well except for this one bug. (Example) Here is part of the fragment shader, as I believe that's where something is going wrong (If ...
PersonMon's user avatar
0 votes
0 answers
166 views

Polygon Rendering with Linear interpolation

I am reading through an old paper (Interpolation for Polygon Texture Mapping and Shading), cause it is mentioned in other papers I am reading. In section two we have the following steps to perform ...
user8469759's user avatar
2 votes
1 answer
108 views

Noise and fragment shader

I'm slightly confused on how to create a simple noise function in a fragment shader if all fragment coordinates are integer therefore unable to interpolate between randomly generated values. What am I ...
Sina Dasht's user avatar
1 vote
1 answer
280 views

How to use maximum resolution (pixel density) with OpenGL in MS Windows

CodeBlocks offers an example program in C, that uses OpenGL. It draws a single multicoloured rotating triangle. I have been building on this example. I am a novice in C and in OpenGL. I believe that I ...
Simon's user avatar
  • 163
6 votes
1 answer
140 views

Can meshes be reused in raytracing?

In rasterization, at least in the context of game development, it is a common to have many instances of the same 3D object in a scene (think many identical rocks in different sizes/positions/rotations)...
Ilya's user avatar
  • 75
4 votes
1 answer
102 views

How to Achieve Radial Rendering

I'm making a POV fan and would like to display some simple graphics in real-time on it. I have a working naive solution with OpenGL, but I'm maxing out at 7 fps rending a simple cube on a raspberry pi ...
Alex Charters's user avatar
0 votes
0 answers
50 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 ...
Tau's user avatar
  • 121
1 vote
1 answer
244 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 ...
Lenny White's user avatar
8 votes
3 answers
2k 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 ...
Nagabhushan S N's user avatar
0 votes
1 answer
871 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 ...
Vectorizer's user avatar
1 vote
0 answers
321 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 ...
Rohan Asokan's user avatar
1 vote
2 answers
235 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 ...
geometrian's user avatar
  • 1,950
1 vote
1 answer
1k 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 ...
Dr. Pontchartrain's user avatar
1 vote
1 answer
224 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 ...
AnnoyinC's user avatar
  • 312
3 votes
1 answer
498 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 ...
Sarah's user avatar
  • 33
4 votes
1 answer
300 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 ...
Jojolatino's user avatar
2 votes
0 answers
53 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 ...
Felipe Gutierrez's user avatar
1 vote
1 answer
571 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?...
Anisa's user avatar
  • 41
3 votes
1 answer
867 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 ...
Anisa's user avatar
  • 41
2 votes
1 answer
117 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: ...
Jojolatino's user avatar
0 votes
0 answers
160 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/...
Ian Bloom's user avatar
0 votes
1 answer
727 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 ...
Jojolatino's user avatar
2 votes
1 answer
282 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: ...
Jojolatino's user avatar
0 votes
1 answer
410 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?
Jojolatino's user avatar
2 votes
1 answer
418 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, ...
AnnoyinC's user avatar
  • 312
1 vote
2 answers
253 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 ...
permeakra's user avatar
  • 119
3 votes
1 answer
760 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 ...
avilapa's user avatar
  • 33
4 votes
1 answer
3k 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 ...
gallickgunner's user avatar
2 votes
1 answer
297 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 ...
kevinyu's user avatar
  • 493
4 votes
1 answer
2k 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 ...
Krupip's user avatar
  • 280
0 votes
0 answers
148 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 ...
Makogan's user avatar
  • 1,696
-1 votes
1 answer
89 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 ...
Charan K's user avatar
1 vote
1 answer
430 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 (...
hans-1795's user avatar
4 votes
1 answer
835 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. ...
chaosink's user avatar
  • 591
4 votes
1 answer
345 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 ...
Matthias's user avatar
  • 1,044
3 votes
2 answers
119 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 &\...
Matthias's user avatar
  • 1,044
16 votes
1 answer
5k 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 "...
lcmylin's user avatar
  • 413
4 votes
1 answer
302 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 ...
rwallace's user avatar
  • 143
2 votes
2 answers
909 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: ...
Benjamin Loisch's user avatar
7 votes
1 answer
7k 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 ...
toastedDeli's user avatar
7 votes
1 answer
1k 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 ...
Andrew Wilson's user avatar
2 votes
0 answers
96 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, ...
mdkdy's user avatar
  • 2,119