Most Popular
1500 questions
35
votes
2 answers
DirectX / OpenGL(Vulkan) concepts mapping chart
Often a similar hardware feature is exposed via DirectX and OpenGL using different terminology.
For example:
Constant Buffer / Uniform Buffer Object
RWBuffer / SSBO
I am looking for an exhaustive chart that describes which DirectX terminology is…

wip
- 1,851
- 1
- 13
- 26
34
votes
2 answers
Why is the transposed inverse of the model view matrix used to transform the normal vectors?
When rendering 3D scenes with transformations applied to the objects, normals have to be transformed with the transposed inverse of the model view matrix. So, with a normal $n$, modelViewMatrix $M$, the transformed normal $n'$ is
$$n' =…

Nero
- 1,320
- 3
- 15
- 31
32
votes
1 answer
Does the original Perlin noise ever have any advantage over Simplex noise?
Perlin noise is one of the most popular procedural noise functions. Perlin later developed Simplex noise which improves on some of the shortcomings of Perlin noise, notably its inefficiency in higher dimensions and directional artefacts (Wikipedia…

Martin Ender
- 2,730
- 4
- 23
- 45
32
votes
2 answers
What is the simplest way to compute principal curvature for a mesh triangle?
I have a mesh and in the region around each triangle, I want to compute an estimate of the principal curvature directions. I have never done this sort of thing before and Wikipedia does not help a lot. Can you describe or point me to a simple…

ap_
- 2,204
- 1
- 18
- 27
31
votes
3 answers
Avoiding z-fighting with coincident surfaces
When rendering two overlapping co-planar surfaces, a common issue is "z-fighting", where the renderer can't decide which of the two surfaces is closer to the camera, giving visual artifacts in the area of overlap.
The standard solution to this is to…

Mark
- 1,612
- 16
- 22
31
votes
2 answers
Path tracing the Cook-Torrance BRDF
-- Sorry for the long post, but I prefer to do that way because "Devil is in the details." :)
I am writing a path tracer from the scratch and it is working nicely for perfectly diffuse (Lambertian) surfaces (i.e. the furnace test indicates - at…
user5681
28
votes
2 answers
What is fwidth and how does it work?
The OpenGL documentation states that fwidth returns the sum of the absolute value of derivatives in x and y.
What does this mean in less mathematical terms, and is there a way to visualize it?
Based on my understanding of the function, fwidth(p) has…

ApoorvaJ
- 597
- 1
- 5
- 8
28
votes
5 answers
Does a sphere projected into 2D space always result in an ellipse?
My intuition has always been that when any sphere is projected into 2D space that the result will always mathematically be an ellipse (or a circle in degenerate cases).
In the past when I was actively doing my own graphics programming and brought…

hippietrail
- 512
- 1
- 4
- 12
27
votes
2 answers
GLSL. Can someone explain why gl_FragCoord.xy / screenSize is performed and for what reason?
I'm new to shaders and know that you can color pixels with gl_FragColor but sometimes there is this thing:
vec2 uv = gl_FragCoord.xy / screenSize; // or resolution or smthn depends on the implementation
If gl_FragCoord is like pixel coordinates,…

idchlife
- 373
- 1
- 3
- 6
27
votes
2 answers
How is a light probe different than an environmental cube map?
Looking at a light probe texture, it looks like a blurry environment map.
What's the difference between the two, how is a light probe made, and what is the benefit of it being blurry?

Alan Wolfe
- 7,801
- 3
- 30
- 76
27
votes
4 answers
Why do T-junctions in meshes result in cracks?
I have heard from many sources that having T-junctions in 3D meshes is a bad idea because it could result in cracks during rendering. Can someone explain why that happens, and what one can do to avoid them?

ap_
- 2,204
- 1
- 18
- 27
26
votes
1 answer
What does "st" mean in the context of OpenGL?
I've seen the term st come up a few times when looking at other OpenGL fragment shaders. However, I don't know what it stands for or what it's used for. Here's an example:
uniform vec2 u_resolution;
vec2 st = gl_FragCoord.xy/u_resolution;
I can…

Edward Loveall
- 363
- 1
- 3
- 7
26
votes
1 answer
What are Affine Transformations?
What are Affine Tranformations? Do they apply just to points or to other shapes as well? What does it mean that they can be "composed"?

luser droog
- 1,363
- 2
- 12
- 27
26
votes
3 answers
Is Russian Roulette really the answer?
I have seen that in some implementations of Path Tracing, an approach called Russian Roulette is used to cull some of the paths and share their contribution among the other paths.
I understand that rather than following a path until it drops below a…

trichoplax is on Codidact now
- 6,292
- 3
- 23
- 69
25
votes
5 answers
Why are quads used in filmmaking and triangle in gaming?
In film school, in the classes of 3D modeling, I was told that when we model something for films we maintain topology of 4 edged polygons. Any polygon which has more or less than 4 edge/vertex is considered bad and should be avoided. Whereas if the…

Santosh Kumar
- 355
- 1
- 3
- 8