# Tag Info

### 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 ...
• 830

### 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

### 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

### 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 ...
• 25.1k

### 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,...
• 8,437
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 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 ...
• 9,852
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 ...
• 25.1k
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 ...
• 3,646
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. ...
• 1,605
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 ...
• 5,950

### 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

### 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 ...
• 7,801
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 ...
• 6,840

### 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 ...
• 1,464

### 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 ...
• 71
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 ...
• 3,792
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 ...
• 186
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 ...
• 6,840

### 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 ...
• 333
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

### 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 ...
• 25.1k
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, ...
• 6,840
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 ...
• 1,611
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 ...
• 76
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 ...
• 25.1k
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 ...
• 1,266
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 ...
• 6,840