Most Popular
1500 questions
16
votes
4 answers
When should quaternions be used to represent rotation and scaling in 3D?
Quaternions (a four-dimensional extension of complex numbers) can used to represent rotation and scaling of a 3D vector, and the application of a quaternion onto a 3D vector involves two quaternion multiplications, thus requiring fewer operations…

es1024
- 433
- 5
- 12
16
votes
3 answers
What are some methods to render transparency in OpenGL
Alpha blending can be turned on to make surfaces transparent, like so:
glDisable(GL_DEPTH_TEST); //or glDepthMask(GL_FALSE)? depth tests break blending
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
But this only works if…

jozxyqk
- 669
- 5
- 16
15
votes
4 answers
For shader math, why should linear RGB keep the gamut of sRGB?
sRGB is often contrasted with "linear RGB."
Images are stored on disk and passed to displays in sRGB, which is approximately perceptually uniform in intensity.
Shader math is done in linear RGB, which is physically uniform in intensity.
Gamma…

Maxpm
- 295
- 2
- 7
15
votes
1 answer
When to disable perspective correct interpolation ( noperspective )
In GLSL, perspective correct interpolation of vertex attributes is the default setting - one can disable it for specific vertex attributes by using the noperspective qualifier. Other than in post-processing shaders, I've never seen the perspective…

gemse
- 253
- 1
- 5
15
votes
2 answers
Handling Projective Aliasing In Shadow Mapping
I'm fiddling with simple procedural 3D modeling to make teeny buildings for 3D printing. An Example:
To make the models more readable onscreen, I've implemented basic shadow mapping for a single directional light. Since my scene isn't changing, I…
user2500
15
votes
4 answers
How is Anti Aliasing Implemented in Ray Tracing?
After reading a few articles online I can confidently say I am clueless on how Anti-Aliasing works when using Ray Tracing.
All I understand is that A Single Pixel/Ray is split into 4 sub-pixels and 4 rays rather than 1.
Could somebody please explain…

Arjan Singh
- 2,511
- 3
- 22
- 38
15
votes
6 answers
How to produce simple 2D illustrations to accompany geometry answers?
In my answer about Affine Transformations I made some little illustrations to help the explanation.
How do you make an upload-able PNG quickly which expresses a geometrical or mathematical idea?
This question was contrived to support my postscript…

luser droog
- 1,363
- 2
- 12
- 27
15
votes
1 answer
Synchronizing successive OpenGL Compute Shader invocations
I have a couple of compute shaders that need to be executed in a certain order and whose outputs depend on previous inputs. Ideally, I'll never need to copy a buffer client-side and do all of my work on the GPU.
Consider I have two compute shaders…

Mokosha
- 1,144
- 7
- 23
15
votes
1 answer
Radiosity VS Ray tracing
Radiosity is basically what allows this:
In a tutorial of Cornell University about Radiosity it is mentioned that:
A ray-traced version of the image shows only the light reaching the viewer by direct reflection -- hence misses the color…

Armfoot
- 615
- 1
- 6
- 14
15
votes
1 answer
Is all grid based noise inevitably anisotropic?
I'm interested in how this applies to higher numbers of dimensions too, but for this question I will focus solely on 2D grids.
I know that Perlin noise is not isotropic (direction invariant), and that the underlying square grid shows up enough to…

trichoplax is on Codidact now
- 6,292
- 3
- 23
- 69
15
votes
2 answers
How to build a decent lens/camera objective model for path tracing?
I have written a small path-tracer after learning and experimenting on smallpt.
The only thing that I did not write (and understood) myself is how the initial rays are computed and fired from the camera. I got the principle right, but I'm looking…

teh internets is made of catz
- 345
- 2
- 7
15
votes
3 answers
Non Real Time Raytracing
I've played with real time raytracing (and raymarching etc) quite a bit, but haven't spent that much time on non real time raytracing - for higher quality images or for pre-rendering videos and the like.
I know one common technique to improve image…

Alan Wolfe
- 7,801
- 3
- 30
- 76
15
votes
1 answer
Are lookup textures still used for anything?
I know in the not so long ago (5-10 years?) that it was popular / efficient to bake data out into textures and then read the data from the textures, often using the built in texture interpolation to get linear interpolation of the baked out…

Alan Wolfe
- 7,801
- 3
- 30
- 76
15
votes
1 answer
Need a reputable source for the formula for the shape of Earth's horizon
What I'm asking for
I stress that I am not asking for the formula---I know the formula, and how to derive it. Several different versions of it are reproduced near the end of the post. In fact, someone else has not only derived it as well, but also…

linguisticturn
- 251
- 1
- 3
15
votes
1 answer
How to map square texture to triangle?
I want to find the texture coordinates for point P. I have the vertices of the triangle and their corresponding uv coordinates.
The numbers in the little squares in the texture represent color values.
What are the steps of computing the uv…

john john
- 423
- 1
- 3
- 9