De-gamma your texture kid!

Nov 1, 2018 - 4 minutes
You just applied gamma correction to your real-time application and everything looks too bright? De-gamma yout textures! To wet your appetite, here it is a wrongly doubly gamma corrected picture. Introduction I have been working on my dx11 toy engine for a while now, and I got to the point where I wanted to try to implement PBR. By following the learn-opengl tutorial, they mentioned that I was going to need to handle HDR, I went and upgraded my deferred renderer to support it, and added a post processing pass to do tone mapping, and since I never did it, gamma correction. Read more ...

Never trust the compiler pt1

Oct 24, 2018 - 4 minutes
You thought those ternary operator were going to be converted to conditional move? Sorry... Introduction It is a normal day, having some fun optimizing a custom CPU implementation of Tero Kerras BVH , with the Superluminal profiler , (super cool by the way, check it out) , when the profiler itself tells you the in the ray traversal function, one piece of code is particularly expensive, I started to drill down to find some interesting surprises. Read more ...

Parallel transport on curve

Jul 31, 2018 - 10 minutes
TL;DR: How to generate a stable orientation along a curve, math and Unity implementation. Here the repository with all the code and Unity project. Introduction Parallel transport is a technique that allows computing a moving frame (a 4x4 matrix defining a coordinate system) down the curve. Here is an example: The computation starts on the top right of the image, where the gizmo is, then move sequentially down the curve. Read more ...