Skip to main content
20 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
  • 830
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
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,810
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
  • 25.1k
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,437
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
12 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,852
12 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
  • 25.1k
11 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,646
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,605
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

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,792
9 votes
Accepted

Area Lights in Path Tracing

I'm going to provide the simple/naive/brute force answer to this question, which does work, and gives accurate results. There are better answers however, which make the rendering converge faster with ...
Alan Wolfe's user avatar
  • 7,801
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,840
7 votes

Importance Sampling of Environment Maps

This is not a full answer, I would just like to share the knowledge I obtained by studying two of the papers mentioned in the question: Steerable Importance Sampling and Practical Product Importance ...
ivokabel's user avatar
  • 1,464
7 votes

Albedo vs Diffuse

The Diffuse, specular and Reflection terms have lead to a lot of confusion because they have been commonly used to describe different lighting processes along the CG history and sometimes diverge from ...
Titou's user avatar
  • 71
7 votes
Accepted

Role of PDF of Uniform Random Sampling in a path tracer

Firstly, as @trichoplax correctly pointed out, your randomPoint function calculates a point in a cube, then uses rejection sampling to return all points that are inside a unit sphere. In order to ...
RichieSams's user avatar
  • 3,792
7 votes
Accepted

What physical properties are “lacking” to keep this 3D scene from looking like a real photograph?

Few things, but usually this is what it takes to make the difference: 1- the material reflection at his head, he is bald, yet the diffuse texture shows color difference where the hair is, this means ...
Georges D's user avatar
  • 186
7 votes
Accepted

Do animation studios like Pixar, Dreamworks, and Disney use super-sampling?

Super-sampling for ray-tracing doesn't just mean rendering an area at higher resolution and then downscaling the finished image: in fact, this simplest super-sampling technique is really not effective ...
Dan Hulme's user avatar
  • 6,840
7 votes

Why do games only allow certain resolutions?

Note that in your Dark Souls example, all the resolutions listed are the exact same aspect ratio. So the question is, why doesn't it support arbitrary aspect ratios? The answer is that it costs ...
default's user avatar
  • 333
7 votes
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 ...
Michal Kučera's user avatar
7 votes
Accepted

Where does the cosine factor comes from in the GGX PDF?

Normal distribution functions are defined a bit differently than you might expect. They're not strictly a probability distribution over solid angle; they have to do with the density of microfacets ...
Nathan Reed's user avatar
  • 25.1k
7 votes
Accepted

Why isn't the clear color visible on the screen between frames?

You're confusing the screen (the physical display) with the framebuffer (the memory which gets read out by the display controller). The framebuffer might get cleared at the start of each frame period, ...
Dan Hulme's user avatar
  • 6,840
7 votes
Accepted

How does the Painter's Algorithm handle transparency?

The common way to render transparent polygons in a rasterizer is by use of Alpha Blending, which basically combines the colour of the supposedly transparent pixel with the colour of the background at ...
Christian Rau's user avatar
6 votes
Accepted

How to create specular surface in Mitsuba Renderer

You want to use the "conductor" plugin to create a smooth conductor / metal type BRDF. See section 8.2.6 in the documentation. As far as Mitsuba is concerned, a mirror is a special instance of a ...
tizian's user avatar
  • 76
6 votes
Accepted

What is the definition of "motion to photon" in VR?

Ideally, motion-to-photon latency is exactly what it says. It measures time from when the user physically makes a motion (say, begins to turn their head) to when the photons physically coming out of ...
Nathan Reed's user avatar
  • 25.1k
6 votes
Accepted

Can (and how so) shaders paint screen pixels beyond those that occupied by the shaded mesh?

When you use linewidth or line antialiasing or pointwidth or pointsprites, OpenGL creates for you a small rectangle instead of the line or point, with texture coordinates. Nowadays you can even ...
Fabrice NEYRET's user avatar
6 votes
Accepted

Why the BRDF of specular reflection is infinite in the reflection direction?

In the BRDF curve, the total area under the curve is the albedo: what fraction of incident light is reflected in total (as opposed to being absorbed or transmitted). For a perfect reflector, the area ...
Dan Hulme's user avatar
  • 6,840
6 votes

How to handle a parametric equation in raytracing?

Many years ago I worked on a ray tracer that handled parametric surfaces, so this is unlikely to be state of the art, but, IIRC, I used a combination of interval arithmetic with (binary?) subdivision ...
Simon F's user avatar
  • 4,306
6 votes

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 ...
Olivier's user avatar
  • 1,585

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