Most Popular
1500 questions
14
votes
1 answer
Why is it twice as expensive to make a noise function that can be tiled?
I've seen in several places that making Perlin noise loop seamlessly requires calculating it twice in slightly different ways, and summing the two results.
This Perlin noise math FAQ gives a formula:
$$F_{loop}(x, y, z) = \frac{ (t - z) \cdot F(x,…

trichoplax is on Codidact now
- 6,292
- 3
- 23
- 69
14
votes
2 answers
What is an index buffer and how is it related to vertex buffers?
I have a vertex buffer like this:
0.0, 0.0,
1.0, 0.0,
0.0, 0.6,
1.0, 0.6,
0.5, 1.0
I have the following index buffer:
0, 2,
2, 4,
4, 3,
3, 2,
2, 1,
1, 0,
0, 3,
3, 1
I know I want to draw gl.LINES using WebGL, which means multiple separated line…

q9f
- 703
- 2
- 8
- 22
14
votes
1 answer
Is Jump Flood Algorithm Separable?
JFA (the algorithm described here: http://www.comp.nus.edu.sg/~tants/jfa/i3d06.pdf) can be used to get an approximation of a Voronoi diagram, or a distance transform. It does so in logarithmic time based on the size of the resulting image, not on…

Alan Wolfe
- 7,801
- 3
- 30
- 76
14
votes
2 answers
Fast antialiased line drawing
Bresenham's line algorithm is a way of drawing straight lines using only fast integer operations (addition, subtraction, and multiplication by 2). However, it generates aliased lines. Is there a similarly fast way to draw antialiased lines?

Mark
- 1,612
- 16
- 22
14
votes
1 answer
How to triangulate from a Voronoï diagram?
I computed a Voronoï diagram from a set of points (with Boost.polygon).
I try to find a Delaunay triangulation, connecting each cell center for each Voronoï edge, but I miss some edges.
In the following image, the red dots are my initial points,…

arthur.sw
- 377
- 2
- 14
14
votes
3 answers
VR and frustum culling
When rendering VR ( stereo view ) environments, do you guys recommend just doing 2 frustum checks for determining what is to be drawn during the frustum culling pass or is there some other check that would be able to combine both frusta?

Garry Wallis
- 203
- 2
- 9
14
votes
2 answers
Why smoothed meshes in 3D studio end up with the same number of vertices/triangles? How then can they be smoothed with the same geometry?
I am trying to understand why meshes that are smoothed in 3D studio (Modifiers/Smoother) end up having the same amount of vertices/faces before or after that process, as well as the exact same geometry.
In the following example, both meshes have 32…

Louis15
- 273
- 2
- 5
14
votes
4 answers
Projected grid water horizon detail
I'm trying to implement an ocean scene with C++ and DirectX11. Currently I have a projected grid, Gerstner waves and a basic shading. My problem is that when I aim my camera horizontally, so I can see the water horizon, in the distance, the…

Gábor Szalóki
- 143
- 5
14
votes
1 answer
Thorough, accessible material about Fourier basis functions and Spherical Harmonics?
Spherical harmonics appear in several computer graphics techniques.
I feel that in order to be a better computer graphics developer, I need to have a deep understanding of what they are and how they are used.
It seems that the reference most often…

wip
- 1,851
- 1
- 13
- 26
14
votes
1 answer
How many Direct/Compute/Copy Queues are meaningful?
DirectX 12 exposes command queues for either graphics (called "Direct"), compute or copy tasks. In terms of provided functionality, each one is a super-set of the following one. The specification states that command queues can be executed…

Wumpf
- 853
- 7
- 15
14
votes
4 answers
How can I raytrace a scene that does not fit into memory?
If the scene to be raytraced cannot be stored in memory, then without adding more RAM to the machine it seems unrealistic to render it in a practical time span, due to the need to load different parts of the scene from disk potentially several times…

trichoplax is on Codidact now
- 6,292
- 3
- 23
- 69
13
votes
1 answer
"Light intensity" of an RGB value
EDIT: I'm not fully clear on terminology here, what I previously understood to be called "brightness" seems poorly defined. I think I am asking about radiant intensity, that is, the measurable intensity of energy emitted, not weighted for subjective…

jsh
- 133
- 1
- 1
- 9
13
votes
1 answer
Does cosine weighted hemisphere sampling still require NdotL when calculating contribution for indirect light?
When converting from uniform hemisphere sampling to cosine weighted hemisphere sampling I am confused by a statement in an article.
My current indirect contribution is calculated as:
Vec3 RayDir = UniformGenerator.Next()
Color3 indirectDiffuse =…

Steven
- 315
- 2
- 8
13
votes
3 answers
What explains the high specularity of metals?
From my understanding, the specular color usually refers to the amount of light that is reflected when the surface is lit at normal incidence, and is noted $F_0$ or $R_0$. Moreover, for non metal materials, this value is calculated from the index of…

Julien Guertault
- 4,420
- 2
- 23
- 47
13
votes
1 answer
OpenGL GLSL - Sobel Edge Detection Filter
With respect to this topic I've successfully implemented the Sobel Edge Detection filter in GLSL. Here is the fragment shader code of the filter:
#version 330 core
in vec2 TexCoords;
out vec4 color;
uniform sampler2D screenTexture;
mat3 sx =…

enne87
- 601
- 2
- 7
- 15