All Questions

Filter by
Sorted by
Tagged with
4
votes
2answers
1k views

Explanation of the Vatti clipping algorithm

I am going through the Vatti Arbitrary Polygon Clipping Algorithm, but got stuck at their very initial explanation. It says the following: Call an edge of a polygon a left or right edge if the ...
4
votes
1answer
875 views

Threads lockstep and conditions in compute shader

I'm working with DirectCompute, but this question can be applied to general gpu programming I suppose. As far as I know the threads in a group works in a lockstep. ...
4
votes
3answers
247 views

Surface shading on an triangle

Let's assume that in a triangle we have computed the brightness on the vertices of a triangle and we have found that it is maximum. Can any other point which lies on that triangle have more ...
4
votes
2answers
751 views

Linear interpolation on Plane (Marching Cubes)

Let's assume I have the following cube. Let's assume the isovalue = 0. I would like to draw the resulting triangles of the isosurface. I know that first I define which values are inside or outside ...
2
votes
2answers
117 views

Matching an HSV color with a blended color

This is hard to explain but I am going to try, then I will explain it as pure mathematics. Look at this image. So basically this is a moving line, each frame a new segment is added and the previous ...
4
votes
2answers
275 views

What is the effect of the BRDF denominator?

I was reading a paper on BRDF. I've come across this formula : $$ f(\omega_i, \omega_o ) = \frac{FDG}{4(N.V)(N.L)}$$ The (N.L) term can be cancelled by the cosine term which appears in the rendering ...
10
votes
2answers
1k views

In a physically based BRDF, what vector should be used to compute the Fresnel coefficient?

The well known Schlick approximation of the Fresnel coefficient gives the equation: $F=F_0+(1 - F_0)(1 - cos(\theta))^5$ And $cos(\theta)$ is equal to the dot product of the surface normal vector ...
1
vote
0answers
294 views

Symmetry plane estimation for 3D point cloud

I have a question about finding the symmetry plane that separate the left and the right halves of a point cloud. We scanned an object, say a human face, with a 3D scanner, such as Kinect, which gives ...
4
votes
0answers
106 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
3k views

Correct form of the GGX geometry term

I'm trying to implement a microfacet BRDF in my raytracer but I'm running into some issues. A lot of the papers and articles I've read define the partial geometry term as a function of the view and ...
4
votes
2answers
101 views

2D projection from some points

I am going through an undocumented function that takes in three points and a Z-value that projects three points on the plane defined by Z-value. I want to understand the mathematical theory behind it ...
8
votes
1answer
792 views

How to get started writing a low-level GPU profiler?

I have been studying hardware corporation GPU profilers in recent days (Qualcomm, PowerVR, Intel). I've noticed that these tools seem to give more low-level details than the GPU profilers I have ...
9
votes
1answer
338 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 ...
13
votes
1answer
2k views

Choosing Reflection or Refraction in Path Tracing

I am trying to implement refraction and transmission in my path tracer and I'm a bit unsure on how to implement it. First, some background: When light hits a surface, a portion of it will reflect, ...
6
votes
1answer
653 views

Generation of lower resolution textures

So I have a game and I am trying to fake glow inside of it by using the hardwares capability to downsize textures causing them to blur. The texture I wish to do this with is in a render buffer that ...
3
votes
1answer
150 views

Count number of green fragments that are within a given distance from each screen fragment

First of all, let me explain what I am really trying to achieve. In a post-effect shader acting on a camera-renderer, I want to change the color of each fragment depending on how many green (RGBA = 0,...
2
votes
0answers
507 views

How to properly implement Phong material and importance sample it in a path tracer?

I'm recently implementing Phong materials in my path tracer. My implementation of a randomly sampled Phong material works and looks fine. But it doesn't work well if the shininess(aka power) is too ...
1
vote
1answer
314 views

Rectangular prism parametric equation

I have some problem in OSG doing my model, which need an rectangular prism, that I do not know the parametric equation. I tried to search with the google, but no usable result. Also tried to draw it ...
3
votes
1answer
50 views

Does a point have a length?

I am going though a functional source that has the following class: ...
4
votes
1answer
145 views

How to detect a screen in a photo

Is there a way to make a difference between a photo of an actual object and a photo of an object through a computer or smartphone screen. For example: how can I detect that the second image is taken ...
3
votes
0answers
30 views

Constructing base mesh for required subdivision surface

Given a triangle mesh, does there exist any algorithm to compute a base mesh (smaller in size than the triangle mesh) that could be subdivided multiple times to get back the original mesh (or an ...
2
votes
0answers
58 views

Perspective Translation Of Quadrilateral

I have mapped four rectangular point(R1->R4) to four quadrilateral points(Q1->Q4) to generate a perspective view. Now I have to translate quadrilateral in x and y direction while maintaing perspective ...
7
votes
1answer
796 views

Resulting Probabilty Density in Path Tracer for paths using Next Event Estimation

I am trying to implement my own Gradient Domain Path Tracer by following the code of this guy who already implemented it: https://gist.github.com/BachiLi/4f5c6e5a4fef5773dab1 I already managed to ...
5
votes
1answer
777 views

What effects does path tracing capture that recursive ray tracing does not?

So I have been wanting to make a rendering engine as a summer project. I'd like to shoot for photo-realism of static scenes rather than real time dynamic game like graphics. So in my research I came ...
8
votes
2answers
537 views

Can (and how so) shaders paint screen pixels beyond those that occupied by the shaded mesh?

I have some experience programming geometry and compute shaders - but never adventured myself in really playing with the fragment shaders. Currently, I am trying to better understand how they work and ...
3
votes
1answer
83 views

face normal consistencies

I am going through code snippet that reads in a triangular model, calculates & store the normal with each Triangle object and eventually check the consistencies of winding order. Let us define a ...
3
votes
2answers
274 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 ...
11
votes
2answers
5k views

OpenGL - Detection of edges

I'd like to load arbitrary meshes and draw thick black lines along the edges to get a toon-shading like look. I managed to draw a black silhouette around the objects by using the stencil buffer. You ...
21
votes
1answer
2k views

Why does my Perlin Noise look “blocky”?

I tried to implement Perlin Noise by myself using just the theory (following flafla2.github.io/2014/08/09/perlinnoise.html). Unfortunately I was unable to achieve the look of the "original" Perlin ...
3
votes
1answer
186 views

What is causing this odd scaling behavior?

OK so I have a simple setup going on. Basically I am just drawing some textures and shapes. However sizing is going weird... let me show you how any maybe you can diagnose. Basically everything is ...
7
votes
1answer
418 views

Gaussian blurring a function defined over a surface mesh

I have a scalar function defined over the vertices of a surface mesh. I want to compute an approximate (and generalized, I suppose) "Gaussian blur/convolution" of this function over the surface. I ...
3
votes
1answer
73 views

Interlacing vertex buffer data with extra efficiency

I am making a 2d game in opengl es 2.0 Inside are tons of rectangles defined by 4 points and one 4 component color. I am using vertex buffer objects, and I have heard that it is efficent to ...
5
votes
1answer
808 views

Role of PDF of Uniform Random Sampling in a path tracer

I am trying to implement my own path tracer but before arriving to the question I want to give you a short overview: In the implementation of the rendering equation I use some particular technique in ...
1
vote
1answer
166 views

Using GPU in PC for GearVR

Usually GearVR + SamsungPhone are used both for rendering and displaying but I would like to use it only for displaying when it is plugged to PC. The reason is to get performance similar to Oculus ...
4
votes
1answer
163 views

Identify different contour cycle after model slicing

The slicing algorithm is done on the STL model and it is ensured that the result is a series of simple polygons that do not intersect each other. In other words all of those polygons generate closed ...
7
votes
5answers
399 views

Why does the 1/r² term appear with point sources?

I'm currently reading some books on radiometry. They mention that radiance is constant along a ray. It doesn't change with distance. However, I've seen some raytracer and they put the 1/r² factor when ...
6
votes
0answers
323 views

Perspective-Correct Texture Mapping

I am working on a small rendering engine for a personal project and I am having issues with the texture mapping part of it. It seems to work for some cases, but not for others. For example, when one ...
3
votes
1answer
103 views

Data fitting SVBRDF with L-M

I am reading two shot svbrdf capture . I want to understand the data fitting. For example, I have my input image 3000x2000 pixels, and I divide it to create my source tiles of 192x192 pixels. The way ...
4
votes
1answer
77 views

generate multiple border contour

Once a 3D model is sliced against a plane and projected onto it, we get a contour curve at certain height. The contour curve I am generating in this process is made of several line segments in closed ...
3
votes
0answers
183 views

Linear gradient shader ( Photoshop-like)

I'm searching a way to implement a linear gradient shader that behaves as the linear gradient in Photoshop (only the vertical case is necessary). It will be applied to 2D sprites. Currently I'm ...
2
votes
1answer
212 views

Unwinding an image on a spiral to make it long and flat

Here's an odd intellectual puzzle. Something I was daydreaming about on a train - but the maths are somewhat beyond me. How would someone go about un-winding a spiral to produce a long flat image? ...
3
votes
1answer
2k views

Calculate vanishing point

In perspective projection, group of parallel lines have the same vanishing point. I am interesting about the reverse calculation: Getting the group of parallel lines equations that their vanishing ...
8
votes
1answer
430 views

How does the rendering equation incorporate shadowing

This is how the rendering equation is written in the textbook $$L(p,\omega) = L_e(p,\omega) + \int f(p,\omega_i,\omega) \, L(p*,-\omega_i)\cos \theta \, d\omega_i$$ which component of this equation ...
3
votes
1answer
192 views

Cohen-Sutherland Clipping

Specify individually the translation and scaling matrices required to transform a 2D window of [Xmin=-234, Ymin=156] and [Xmax=66, Ymax=456] to a display viewport of [Umin=45, Vmin=35] and [Umax=245, ...
3
votes
1answer
123 views

Optix: Rendering time-variant data

I have a Optix Raycasting renderer which loads and renders VTK files. For a single static model this works fine. But now my dataset consists of multiple timesteps which I want to display in a ...
10
votes
3answers
987 views

16bit half-float linear HDR images as (diffuse/albedo) textures?

So I been thinking about this for a while and tried to google for an answer but without any success. If all your textures are 8bit LDR images, like JPEGs, couldn't that potentially cause conflicts ...
1
vote
0answers
46 views

Check if one line segments is entirely on the other line segment

I am trying to find an algorithm as mentioned in the subject. It is as follows: ...
3
votes
2answers
667 views

3D rotation matrix around vector

I am using matrix for performing 3D rotations. I know that in 3D space the matrix product order is important - changing the order of the matrices can effect the rotate result. So I am interesting ...
2
votes
0answers
74 views

Bilinear Transformation not working

I implemented this algorithm to fit given image to specified quadrilateral but the output is blank. I implemented it in C# as follows ...
5
votes
2answers
359 views

Why did tessellation come to be a prominent feature?

Tessellation has been touted as one of the major features in newer graphics APIs like DirecX 11, and it is shown as a standalone stage in a modern graphics pipeline. Compared to the amount of ...

15 30 50 per page