The 2024 Developer Survey results are live! See the results

# Tag Info

Accepted

### Why are normal maps blue and purple in color?

Only tangent space normal maps are primarily blue. This is because the colour blue represents a normal of (0,0,1) which would be an unchanged normal when the triangle lies in the plane x and y, i.e. ...
• 561

### What are Spherical Harmonics & Light Probes?

Spherical harmonics If you know what a Fourier transform is, you already almost know what spherical harmonics are: they're just a Fourier transform but on a spherical instead of a linear basis. That ...
• 6,860
Accepted

### What are Spherical Harmonics & Light Probes?

Basics of Spherical Harmonics Spherical Harmonics is a way to represent a 2D function on a surface of a sphere. Instead of spatial domain (like cubemap), SH is defined in frequency domain with some ...
• 3,666

### Rendering equation - why unsolvable directly?

I'm sadly not able to add a comment to the answer above (not enough reputation), so I will do it like this. I'd like to point out that what Dragonseel describes is simply an integral equation (...
• 304

### Why are normal maps blue and purple in color?

Because a normal map is covering vectors from -1 to 1 it makes sense to stretch this range into 0->1 so all of it can be fit inside the range of RGB. So usually we apply a transform on the normal to ...
• 2,322

### Rendering equation - why unsolvable directly?

The rendering equation is as follows: Now, the integral is over the sphere around the point $x$. You integrate over some attenuated light, incoming from every direction. But how much light comes in? ...
• 1,810
Accepted

### For shader math, why should linear RGB keep the gamut of sRGB?

Talking about Linear RGB must be avoided because it does not tell you anything about the RGB colourspace intrinsics, i.e., Primaries, Whitepoint and Colour Component Transfer Functions. A few years ...
• 246
Accepted

### What is a vertex normal used for?

First, I cannot imagine how could a vertex have a normal,... Welcome to the exciting field of computer graphics. The first thing that might lead to your confusion is to think about a vertex too much ...
• 1,251
Accepted

### Why is spherical harmonics used in low frequency graphics data instead of a spherical Fourier transform?

Spherical harmonics really are the "spherical Fourier transform" you're looking for. The kind of hack you mention in comments, of doing a 2D Fourier transform on a lat-long projection, suffers from ...
• 6,860
Accepted

This is a common problem with very subtle gradients. The problem is that the image is displayed with 8 bits per component and this is not quite enough precision to make a gradient that is smooth to ...
• 25.1k

### Formula for the ambient light intensity of a scene?

Using an 'ambient light' term in your lighting calculations is an approximation of the indirect light reflected around the scene. Usually it's up to the artist to choose an appropriate value. There ...
• 3,792
Accepted

### Why Diffuse Light use max(N · H, 0) instead of just letting it be negative?

If lighting with multiple lights, they add together to make the final lighting value. A negative light would darken other lights, which is incorrect. This is also true if you add in specular ...
• 7,801
Accepted

### Tweaking a glow shader to make it look better

Sigma and kernel size of Gaussian filter Regarding how to choose the sigma and the kernel size (pixels) of the Gaussian: you set the sigma based on how wide of a blur you want (judging it visually) ...
• 25.1k
Accepted

### Physically Based Area Lights

When I implemented real-time area lighting, there were two documents I kept referring to: "Moving Frostbite to PBR" by Sebastien Lagarde and "Real Shading in Unreal Engine 4" by ...
• 3,666
Accepted

### Modern way of light sources in OpenGL?

Why are they deprecated? Those functions are deprecated because the OpenGL API moved in favor of a programmable pipeline in contrast with the old fixed pipeline. The programmable pipeline allows the ...
• 546
Accepted

### Refraction in a Ray Tracer: What do with an intersection within the medium?

this is an interesting question (and I am actually an author on Scratchapixel so I can maybe help on that one)). Things go as follows: you cast the primary ray into the scene the ray hits the glass ...
• 656
Accepted

### Bloom in DirectX

This effect is called light bloom. Its algorithm is usually a variation of the following: Render your scene (preferably in high dynamic range) to texture. Make a thresholding pass to another texture. ...
• 892
Accepted

### Alternatives to Ambient Occlusion

Ambient occlusion cannot be physically based no matter what algorithm you use to calculate it. It's a simplification of global illumination that assumes all occluders only block light and are ...
• 434
Accepted

### Confused about prefiltering environment maps (Manson 16)

Your first quote is referring to "Split-sum approximation" presented in "Real Shading in Unreal Engine 4" by Brian Karis, and also referred in the paper [Kar13]: \frac{1}{N}\sum_{k=1}^N \frac{L_i(...
• 3,666
Accepted

### Ambient Lighting

Correct is the OpenGL way. If you had a white light ( let's say vec3(255,255,255) ) and just simply added it to a blue object ( vec3(0,0,255) ), the object would seem to be white, which is wrong. But ...
Accepted

There’s an interesting technique that’s been used in demoscene and Shadertoy projects for a while, and an analogue of which recently made it into Unreal Engine 4: using signed-distance fields and ...
• 2,222
Accepted

### Roughness Value of (Close to) Zero in Physically Based Rendering

Yes, I think it's expected that setting roughness = 0, combined with using point lights for illumination, leads to no visible specular highlight. The size of the highlight is infinitesimally small, so ...
• 25.1k
Accepted

### What are some new Real-Time Graphics Rendering Techniques to get closer to real life?

PBR isn't just a feature you "add to a rendering engine" but an entire philosophy how to approach solving rendering problems. This seems to be a common prevailing misconception when people talk about ...
• 3,666

### What are Spherical Harmonics & Light Probes?

Spherical harmonics Let's say you have some data in an array but you want to represent that data with a fewer number of bytes. One way to do that could be to express the data as a function instead ...
• 7,801
Accepted

### Path Tracing With Multiple Lights

It's not that hard. If you have just planar or angular light sources, you can think of them as one light source split into multiple chunks and the only thing to deal with is how to sample this multi-...
• 1,464

### What's the concept of "Ray" really?

A ray is just a semi-infinite line, and casting the ray finds intersections between the ray and an object in the scene. It doesn't just tell you the position in space that the ray intersected the ...
• 6,860
Accepted

### Irradiance Map Equation What is "dω"?

$E_n$ is illuminance (or irradiance), $L_i$ is luminance (or radiance) in direction $\omega_i$ and $d\omega$ is differential solid angle. TL;DR: $d\omega_i$ is the area of a pixel in the cubemap ...
• 3,666

### What is missing in this image that stops it from looking like a photograph?

The hair seems to have sampling noise or aliasing in it. This might be poor jpeg compression but it does not look like it. I've never seen hair part that way (could just be me). The neck looks a ...
• 1,585