Most Popular
1500 questions
12
votes
1 answer
Why is accessing textures much slower when calculating the texture coordinate in the fragment shader?
When using textures in GLSL, it is best to calculate the final texture coordinates in the vertex shader and hand them over to the fragment shader using varyings. Example with a simple flip in the y coordinate:
// Vertex shader
attribute vec2…

Nero
- 1,320
- 3
- 15
- 31
12
votes
1 answer
Is doing multiple Gaussian blurs the same as doing one larger blur?
To make Gaussian blurring a 2d image faster, I know that you can do one axis and then the other.
I'm wondering though, if I did two Gaussian blurs of size $N$, would that be the same mathematically as doing one Gaussian blur of size $2N$?

Alan Wolfe
- 7,801
- 3
- 30
- 76
12
votes
1 answer
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 half vectors: G1(v, h). However, when implementing…

Erwin
- 123
- 1
- 6
12
votes
2 answers
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 can see the result here:
But what's missing are…

enne87
- 601
- 2
- 7
- 15
12
votes
2 answers
What kind of technology would be involved in the rendering of human nails?
There are many references related to the physically-based rendering of several natural features of the numan body, such as skin, hair, eyes.
However, I could not find specific information about the simulation of visually realistic nails. For…

wip
- 1,851
- 1
- 13
- 26
12
votes
1 answer
What is the benefit of using Half Edge over Winged Edge?
For mesh representation, what is the benefit of using Half Edge over Winged Edge data structure?
I understand both mesh representations, the only difference is that half edge uses directional edge and winged edge uses undirectional edge. So far, I…

Bla...
- 481
- 4
- 12
12
votes
1 answer
Is modifying a texture (painting on it) considered a "state change"?
The convention in graphics is that performing fewer state changes is better than performing more state changes (switching shaders, binding buffers, binding textures, etc.). For textures, it is faster to render many polygons using a single atlas (for…

TheBuzzSaw
- 227
- 2
- 7
12
votes
1 answer
Rendering in radiometric units or photometric?
In traditional rendering, it is typical to do all the calculations with radiometric units, either as full spectral rendering, or component-wise (XYZ, RGB, etc).
However, as modern rendering adds more physically based models, it's convenient for…

RichieSams
- 3,782
- 25
- 35
12
votes
3 answers
How can I make my ice cubes look real?
I can model ice cubes as slightly misshapen transparent cubes with the refractive index of water, but they don't look convincing. They look like lumps of glass rather than ice.
Looking at real ice cubes I can intuitively describe some differences…

trichoplax is on Codidact now
- 6,292
- 3
- 23
- 69
12
votes
2 answers
What would be the correct way to calculate saturation in this case?
I'm trying to make a HSV representation of the xyY color space. To calculate hue from an $(x, y)$ color, I use the angle between that color and red (wavelength 745) on the xy chromacity diagram, with white $(\frac{1}{3}, \frac{1}{3})$ as the…

abcd5555
- 123
- 5
12
votes
0 answers
How correct is rendering in XYZ / linear RGB space?
I have a spectral power distribution (SPD, 5 nm steps) for all light sources in the scene and SPDs for the reflectance of all surfaces under any light / viewer angle in question.
I'm going to calculate in floating point precision and not clamp any…

David Kuri
- 2,293
- 13
- 32
12
votes
1 answer
What is the difference between importance sampling and mutiple importance sampling?
I can't understand math equations. I'm a graphic designer.
What is "importance sampling"?
What is "multiple importance sampling"?
Could you explain easily, using illustrations and no math equations? What is the difference between "importance…

kangsume
- 121
- 3
12
votes
2 answers
Hardware-accelerated drawing of curved shapes
How to quickly draw a curved shape?
by "quickly" I presume one should use hardware facilities as much as possible
by "curved" I mean boundaries defined by either quadratic or cubic Bezier curves
by "shape" I mean either a "fat" stroke (i.e. more…

Ecir Hana
- 1,459
- 11
- 20
12
votes
1 answer
Which effects do I need to take into account for the iris of the eye?
The iris (the colourful ring surrounding the pupil of the eye) is covered in a layer of water, and appears to have opaque elements embedded in transparent and translucent elements. What effects do I need to model in order for the iris to appear…

trichoplax is on Codidact now
- 6,292
- 3
- 23
- 69
12
votes
1 answer
Convolution of Hemispherical Harmonics
Spherical Harmonics (SH) are a way to represent low-frequency spherical functions with only a handful of coefficients. They have some nice mathematical properties, e.g. a convolution with a kernel function h(x) (that has circular symmetry) can be…

David Kuri
- 2,293
- 13
- 32