# All Questions

3,963 questions
Filter by
Sorted by
Tagged with
1 vote
62 views

### Motivation for densities wrt the same measure in MIS

In Veach's thesis the MIS weights (e.g. using the balance heuristic) for two strategies with densities $p_1, p_2$ are given as $w_1(x) = \frac{p_1(x)}{p_1(x)+p_2(x)}$ and \$w_2(x) = \frac{p_2(x)}{p_1(x)...
• 2,083
61 views

### How many rays can one RT core calculate simultaneously?

I have noticed that all GeForce RTX cards, without exception, have an equal number of RT cores as they have streaming multiprocessors (SM). From this fact I assume that each RT core is associated with ...
• 101
31 views

### Theoretical speedup from sample number in path tracing algorithm

Suppose, in a Kajiya style path tracing algorithm, I have 100x100 pixels, and I am using 32 samples per pixel. So, the total ...
• 125
33 views

### Bright results when importance sampling GGX NDF

I've been trying to importance sample the GGX NDF of my Cook-Torrance BRDF for some time now but I can't get it right. I've been following this article. Here's my code for the importance sampling part....
• 135
89 views

### Normalized Device Coordinates: Why normalize the Z value?

I understand that the normalized device coordinates are the result of the perspective divide of clip space coordinates and allow for an easy mapping of the xy coordinates to a physical screen. What I ...
• 164
1 vote
96 views

### Matrix form of an open uniform cubic b-spline

I'm trying to find the matrix form for the equation of a cubic b-spline. More specifically, the "middle" part, S_i(t), is pretty straightforward and available everywhere: ...
• 11
77 views

### How to setup a 3D camera

I'm trying to figure out how to setup a 3D camera in WebGL. This is my first swing at 3D so a lot of the matrix stuff is new to me. Code The code can be reviewed in this CodePen: https://codepen.io/...
• 127
1 vote
74 views

### Importance sampling microfacet BRDF and coordinate frame

I'm trying to importance sample the Cook Torrance BRDF for my path tracer but I'm not sure about the part where you have to change the sample from one coordinate frame to another. This resource states ...
• 135
67 views

### How to scale down noise frequency?

I'm making a space game and so far what I have is a system to generate spheres with noise on them, making them planets. I make a sphere, create noise data, write that data to an image file, and then ...
• 11
1 vote
100 views

### How to get the accurate number of triangles of an wavefront obj model?

I am confused by a 'wavefront obj' file's true triangle number. For example, I downloaded the Rungholt scene from McGuire's Computer Graphics Archive. ...
• 125
121 views

### How does the Communication between Monitor and GPU work?

I know that this Topic is highly Hardware dependent, so i am asking for the case that a monitor is connected to a GPU or motherboard via. Displayport/HDMI I would like to know is how the monitor is ...
59 views

### How to design an ergonomic software rendering pipeline with painter's algorithm?

I wrote my software renderer with C++20 and the DirectX Math library. The pipeline so far consists of these steps: I use vertex buffers (...
• 1
1 vote
36 views

### Curved world effect shader for heterogeneous mesh faces

I have a voxel based game, similar to Minecraft and want to apply the "curved world effect" like described here. As I was using a per 1x1 face quad renderer, applying the effect went well, ...
• 113
172 views

### Relative coordinates -- cumulative sum

I have a vertex shader happily producing all the vertices I want for a 2D plot. Now I want to also render a plot of the same data, but each point relative to the previous one, like SVG Paths using <...
• 11
1 vote
45 views

### What algorithm approximates a "hand sketched" look for rendering diagrams?

I see a number of applications where polygons, lines, splines, etc., are algorithmically given a "hand drawn" look. What algorithm or general approach is applicable for this? As an example, ...
76 views

### What is in a GPU driver?

There are 3 kinds of code that are contained in a GPU-utilizing program: CPU code. CPU-to-GPU or GPU-to-CPU bridge code. This is what DirectX actually is. GPU code. In NVidia speak, this is called a &...
53 views

### What are applications of 3D geometry to 2D geometry projection and occlusion handling?

As a layperson in the field of computer graphics, I rarely see practical applications of algorithms that take 3D geometry as the input (along with some camera and lighting parameters) and output the ...
• 103
1 vote
45 views

### Are systems like double pendulum used for generating terrain?

Looking at the output of the angle of this double pendulum made me think this was a good candidate for generating realistic looking terrain profiles. I can't be the first to notice this so I was ...
• 83
1 vote
91 views

### Does WebGPU Have Significant Feature/Functionality Gaps As Compared to Vulkan/DirectX12/Metal?

A friend and I are considering using webgpu native (more specifically C++ bindings) for a project. We were wondering, since WebGPU likely runs on top of Vulkan XOR DirectX12 XOR Metal at any given ...
1 vote
522 views

### fast algorithm to check if a point is inside/outside mesh

Usually a ray casting algorithm is used to determine whether a point is indide or outside a mesh. But this algorithm is slow. Is there any fast algorithm to do this check? My input mesh is a ...
• 31
74 views

### How to pick values of ambient, diffuse, specular for Phong Lighting?

I have the following code in python using the vedo package ...
• 101
1 vote
47 views

### BlinnPhong sphere edges look worse than Phong. Am I doing it wrong? (code and pictures included)

First of all, I am completely new to this so please excuse me if this is a dumb question. I am following the book Real-Time 3D Rendering with DirectX and HLSL, for now implementing shaders in Nvidia ...
• 11
28 views

• 151
42 views

### My projection matrix for OpenGL fails on non-symmetric boundaries

Assuming my viewing volume has x coordinates varies from l to r, and y varies from top to bottom, and finally z-axis varies n to f, I derived the following projection matrix: ...
56 views

### Cropping a .usdz file

I have a program that is creating usdz 3D models from real world objects. I would like to be able to crop those objects in 3D space to remove extraneous nearby objects or walls. Is there a good ...
147 views

### looking for meshlet generation algorithms

I am looking for algorithms to create meshlets from triangulated meshes. I searched for articles, but could not find any. Maybe "meshlet" is not the right term? I want to cluster the faces ...
• 1,136
131 views

### How is the alpha value treated when blending?

I'm struggling with understanding how blending works. Here's what I understand: when I set the following ...
53 views

### Rigorous example of early graphics system

Here is a paragraph of Shreiner and Angel's Interactive Computer Graphics: "Early graphics systems used general-purpose computers with the standard von Neumann architecture. Such computers are ...
• 101
167 views

### Can I copy one texture to another perfectly with texelFetch()

Imagine I have two uncompressed, 2D textures A and B with identical sizes and formats. I bind A to texture unit 0, and B to a framebuffer object. If I draw a full-size polygon in that framebuffer with ...
• 186
55 views

### Recursive sampling in Marching Squares

So I just saw a video on Marching Squares by reducible, and I thought of a straightforward optimisation, but I couldn't find anything about it online. Basically here's the idea - Start with a fairly ...
93 views

### With a light source at (0,2,0) and unit cube (from [-1,1]) using a given shading formula, how is the r,g,b for each surface calculated?

The above problem is from a past Computer Graphics exam. I am particularly confused about the explanation given, firstly for the top and bottom planes (since the direction of normal for top plane ...
234 views

### How do I evenly subdivide the projection of a circle in 3D?

I want to draw a circle in 3D from line segments. There are plenty of examples how to do this with an even number of subdivisions in 3D space, but I want the minimum number of subdivisions to produce ...
• 121
45 views

### Raytracing Diffuse Function not Working as Expected

I am trying to write a raytracing renderer using compute shaders in Metal. My implementation is based off of Peter Shirley's Raytracing in One Weekend: https://raytracing.github.io/books/...
• 1
89 views

### How to extract region inside a loop on sphere

The input is a sphere(defined by radius and center) and a loop defined by a set of points(unordered, illustrated in cyan in the image above) that satisfy the implicit function of the sphere. How can I ...
• 31
48 views

### Given 2d control points, how to write a vertex shader that evaluates a cubic bezier curve?

I need to write a program that evaluates a cubic bezier curve, using threejs and vertex shader. I tried to calculate the bezier curve based on the x axis and the control points using the cubic bezier ...
• 111
420 views

### OpenGL compute local size vs. performance

Does anybody know if using very small local sizes in compute shaders will hurt performance? eg. If I do this in a shader: ...
• 186
258 views

### OpenGL compute for sizes that aren't a multiple of "local_size"

I've been going round in circles trying to understand OpenGL compute shader "work groups" and it's doing my head in. It's all about as clear as mud. In my compute program I have to set a ...
• 186
56 views

### Interpolate Gradients to Vertices of triangular mesh

A well known way of interpolating the gradient field of a scalar field onto faces of a triangular mesh uses the following formula (source: https://www.cs.cmu.edu/~kmcrane/Projects/HeatMethod/...
1 vote
57 views

### Numerically integratable fog volume feathering along a ray

I haven't been able to come up with a good solution for this myself, so I thought I'd ask if anyone else has any good ideas on how to approach this problem. Here's more or less what I'm trying to do ...
56 views

### Why do I get a black scene in OpenGL in Python?

I'm building a scene: a cylinder, and a torus and an icosahedron spin around it, enter the fog and exit the fog. Using a file with a fog texture (any). However, I get a black scene at the exit - why ...
1 vote
75 views

### Partial Workgroup release of compute shaders?

When using compute shaders, some workgroups can be faster than others, for example when all invocations within one group go into the 'if' case, where on another workgroup the invocations go into the '...
• 1,136
58 views

### Calculating world coordinates of a pixel from a camera picture

Sorry for this question. I know there are many similar questions but I really know nothing about math that involves this case. I have a picture taken from a camera. I know some information about this ...
• 101
1 vote
80 views

### Graphics API and double precision

For scientific reasons, we have to use doubles in our shaders. We don't need to talk about trying to store data in floating point numbers and so on. I know there is special GPU hardware for double ...
• 1,136
1 vote
200 views

### Workgroup size performance change?

I know, that when using compute shader, the invocations should to be grouped with respect to a multiple of the hardware minimum workgroup size (Nvidia 32, AMD 64). Otherwise cores are blocked. In case ...
• 1,136
1 vote
51 views

### Distortion or Aliasing of a UV Sphere

I am trying to map a texture on a UV sphere. I created an algorithm to generate the vertices of the sphere and the UV texture coordinates for each vertex. How I do fix the distortion or aliasing? The ...
54 views

### Intel UHD extremely slow copy operations

Is there a way to make copy operations such as CopyResurce(d3d11) and glBlitFramebuffer(ogl) on multi-sample resources faster ...
192 views

### 3D triangle rasterization to voxels

Is there an algorithm to rasterize triangles into voxels (3D, not 2D) that is linear in the amount of voxels in the output? I.e. given a triangle and a grid, generate the exact voxels that the ...
• 1,696
1 vote
99 views

### GLSL : Extremely slow compilation when using loop

I am making multiple gradients with GLSL. However, when I started using a loop instead of a lengthy else if condition, the compile time jumped from 2-4sec to 40sec !...
25 views

### Is there a way to automatically optimize imags based on predefined marker on image?

Color correction is tricky. It's always a lot of work to make everything look same. I have multiple products (clothing) to take a picture of. One is 100% red, other 100% Orange. Some are multicolor ...
• 103