38 votes
Accepted

Albedo vs Diffuse

The short answer: They are not interchangeable, but their meaning can sometimes appear to overlap in computer graphics literature, giving the potential for confusion. Albedo is the proportion of ...
trichoplax is on Codidact now's user avatar
33 votes
Accepted

When is a compute shader more efficient than a pixel shader for image filtering?

An architectural advantage of compute shaders for image processing is that they skip the ROP step. It's very likely that writes from pixel shaders go through all the regular blending hardware even if ...
John Calsbeek's user avatar
30 votes
Accepted

How can virtual texturing actually be efficient?

Overview The main reason for Virtual Texturing (VT), or Sparse Virtual Textures, as it is sometimes called, is as a memory optimization. The gist of the thing is to only move into video memory the ...
glampert's user avatar
  • 1,449
23 votes
Accepted

What is the "dipole approximation" for subsurface scattering?

The assumption underlying such model is the same as lots of other models for skin rendering; the subsurface scattering can be approximated as a diffusion phenomenon. This is good because in highly ...
cifz's user avatar
  • 2,518
19 votes

When is a compute shader more efficient than a pixel shader for image filtering?

John has already written a great answer so consider this answer an extension of his. I'm currently working a lot with compute shaders for different algorithms. In general, I've found that compute ...
bernie's user avatar
  • 820
19 votes
Accepted

Cause of shadow acne

Image 1: A bad case of shadow acne. (Synthetic and a bit exaggerated) Shadow acne is caused by the discrete nature of the shadow map. A shadow map is composed of samples, a surface is continuous. ...
joojaa's user avatar
  • 8,367
16 votes
Accepted

Physically based rendering and ray tracing

"Physically based" is not a very well defined term, so it's difficult to answer this question exactly. In general, "physically based" refers to the fact that the algorithm in question is derived from ...
Benedikt Bitterli's user avatar
15 votes
Accepted

Efficient rendering with many light sources

Yes, but you need a paradigm shift. What you are accustomed is called forward rendering. You submit your geometry and then you proceed immediately with the shading pass. In the basic forward ...
cifz's user avatar
  • 2,518
15 votes

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 (...
Vanbus's user avatar
  • 304
14 votes

How can virtual texturing actually be efficient?

Virtual Texturing is the logical extreme of texture atlases. A texture atlas is a single giant texture that contains textures for individual meshes inside it: Texture atlases became popular due to ...
RichieSams's user avatar
  • 3,702
13 votes

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? ...
Dragonseel's user avatar
  • 1,800
13 votes

Correct Specular Term of the Cook-Torrance / Torrance-Sparrow Model

I would trust Pharr and Humphreys on this. Equation 2 also agrees with the SIGGRAPH Physically Based Rendering course notes, as well as with equation 20 in the Walter et al paper that introduced the ...
Nathan Reed's user avatar
  • 24.7k
13 votes

How to achieve gimbal lock with Euler angles?

A gimbal is a pivoted support that allows you to rotate around one axis. Now it so happens that Euler rotations* work like a set of 3 gimbals attached to each other,...
joojaa's user avatar
  • 8,367
13 votes
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 ...
Kel Solaar's user avatar
11 votes
Accepted

Why do Vertex Buffer Objects improve performance?

In general, when you render an object in an immediate mode—issuing line drawing commands for instance—you build up a series of commands that you submit to the graphics card to draw. If you're drawing ...
porglezomp's user avatar
11 votes

Avoiding z-fighting with coincident surfaces

If the surfaces are exactly co-planer, your fate is up to the FPU gods; you'll more than likely have Z-fighting. If the triangles are identical and you do the exact same math to each, you will end up ...
RichieSams's user avatar
  • 3,702
11 votes
Accepted

What are some methods to render transparency in OpenGL

A set of techniques to avoid explicit ordering go under the name of Order Independent Transparency (OIT for short). There are lots of OIT techniques. Historically one is Depth Peeling. In this ...
cifz's user avatar
  • 2,518
11 votes
Accepted

How to achieve gimbal lock with Euler angles?

Rotations in 3D are normally done with matrices. The xyz Euler angles can be converted to matrices so that it can be used in the rotation. That is where something called rotation order comes in. ...
bram0101's user avatar
  • 1,595
10 votes

Why do Vertex Buffer Objects improve performance?

There are two steps that make the VBO more efficient than immediate mode. Immediate mode (glBegin/glEnd, glVertex*, etc.) means that at each frame, you spoon feed the vertices, attribute per ...
Julien Guertault's user avatar
10 votes
Accepted

How does the rendering equation incorporate shadowing

Light that is blocked will mean that $L(p*, -w_i)$ under the integral is 0 plus how much light the blocking object itself reflects. In other words the shadowing is embedded in the incoming light ...
ratchet freak's user avatar
10 votes
Accepted

Perspective Correct Texture Mapping

You are on the right track but what you need to do is to calculate u/w and v/w, and also 1/w for each vertex, which you interpolate linearly in screen space in your rasterizer. Then for every pixel ...
JarkkoL's user avatar
  • 3,596
10 votes

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 ...
RichieSams's user avatar
  • 3,702
10 votes
Accepted

What are the use cases for multiple render passes?

Instead of listing specific use cases, I will explain the technical limitations of a render pass structure which would prevent someone from putting all of their rendering within it. The use cases ...
Nicol Bolas's user avatar
  • 9,579
10 votes
Accepted

What are 'mesh clusters' / hierarchical cluster culling (with LOD?) / triangle cluster culling and how do they relate?

First, to preface: the reason it's hard to find details about these hierarchical cluster culling systems because they are a still emerging field, at the very cutting edge of real-time rendering ...
Nathan Reed's user avatar
  • 24.7k
9 votes

Is there some kind of Bresenham algorithm or equivalent for scanline rendering a rotated ellipse?

The classic book Computer Graphics: Principles and Practice (second edition) by Foley, van Dam, et al. describes such an algorithm in section 19.2. The explanation in the book seems to come from an ...
lhf's user avatar
  • 724
9 votes
Accepted

Difference between rendering in OpenGL and 3D animation software

The main difference would be that with OpenGL in let's say a video game, you will have a process called rasterization which basically takes care of determining what part of the scene you see. It needs ...
xoryouyou's user avatar
  • 205
9 votes

Cause of shadow acne

As an addition to the answer of joojaa: Using a bias to offset the shadow function does indeed solve the problem with shadow acne, but it can introduce an additional problem: Peter Panning As you see ...
Dragonseel's user avatar
  • 1,800
9 votes
Accepted

What methods/technologies to reduce required performance for virtual reality are there?

Avoid stereo when possible There was some research published recently measuring when users can or cannot tell whether the specular contribution, which is view point dependent, is different between ...
Julien Guertault's user avatar
9 votes
Accepted

What is the difference in overlay and framebuffer?

As you've understood, the framebuffer is an array in memory that holds all the pixels to display on the screen. On a desktop PC, it's probably special memory on the graphics card, but in a SoC with ...
Dan Hulme's user avatar
  • 6,680

Only top scored, non community-wiki answers of a minimum length are eligible