Better sound for better (or at least not worse) graphics

Introduction

This post was supposed to be part of a bigger post about perception in rendering. The plan was to answer two questions : how can I make graphics look more ‘perceptually-plausible’ ? and how can I make graphics look better without actually improving them ? In this post, I’ll try to answer the second question.

Continue reading

Advertisements

Introduction to the Jacobian and its use in graphics

Recently, Jacobians appeared a lot in my notes/research. So far on my blog, I somehow managed to avoid talking about them. In my post on why there is a 4 in the physically based specular BRDF, a Jacobian was hidden. Same thing in my last post on texture aliasing, when I talked about the mipmap level selection. Also, I recently saw tweets about volume preserving cube/ball mapping. A few years ago, I found a paper explaining a similar technique, and put in my to-implement-when-I-have-some-time list (which is really not a list by the way, more like a last-in first-out stack). This recent interest in such mapping made me dig up that paper, and again : Jacobians were there. It seems they are everywhere in math (duh!) but in 3D graphics also. As they will probably appear again in my work, I guess it’s time to properly address the elephant in the room, once and for all.

Continue reading

Ramblings about skin rendering in games

I wanted to talk about skin rendering for a long time. Actually, after each E3, I got this urge because of all the in-engine trailers. I guess now is the time. Disclaimer : I am no skin rendering expert, not even a beginner, I read a few things about it, and I might/may/will say factually false things about it. You could say ‘Then why the hell are you talking about it ?’ and my response to that is ‘Because it’s my blog’ 🙂
Continue reading

Notes on Anti-Aliasing : FXAA (part 2)

(Note to myself, I really really need to speed up the writing of this series. I planned to be exhaustive, with long articles, code samples, images, drawings… But at this rhythm, if I want to talk about SSAA, MSAA, TAA, SMAA, texture filtering with mipmapping, Toksvig, Han, LEAN, plus 2 or 3 other candies, I’ll be dead before reaching the end of it… Anyway, let’s start !)

“Smooth polygons smooth men’s [and women’s] hearts too”

The first AA technique I want to talk about is the fast approximate anti-aliasing method (FXAA). Continue reading

Notes on Anti-Aliasing : Introduction (part 1)

Aliasing is still one of the most important problem in computer graphics. In games, it is, in my opinion, the biggest factor affecting image quality. In this post, I’ll try to explain how I understand aliasing, before talking about aliasing in games and the techniques used to reduce it. I plan to go deeper in the techniques used in games in other posts. Note that I intend to keep this post simple & “math free”, so I may use a few simplifications. Continue reading

Erasing elements of a vector is slow

Two years ago, I was looking for an internship and I got selected for a few interviews. During one of those, the interviewer asked me some “simple” C++ questions, nothing really fancy. One of the questions required to know the behaviour of the STL std::vector::erase method (Is the capacity modified ? the size ?).

Continue reading

Reconstruct position from depth in GLSL

It sure is not the most efficient way to do it, but it accomplishes what I want : slim down the g-buffer to save some bandwidth.

vec3 GetWorldPosFromDepth(vec2 texCoord)
{
    float depth = texture(depthBuffer, texCoord).x;
    vec4 pos = vec4(2.f * texCoord - 1.f, 2.f * depth - 1.f, 1.f);
    pos = viewProjInvMatrix * pos;
    return pos.xyz / pos.w;
}