Hair expansion in Vertex Shader

Nov 5, 2018 - 8 minutes
How would you go and expand your hair segment into polygons you can shade? Geometry Shader? Vertex Shader? Introduction The other day I was talking with a friend who was trying to make grass shader, he was going about it by using a geometry shader. Although a geometry shader is a really appealing solution, it might not be the fastest one. Why not geometry shader? Warning, what I am about to say is mostly what I gathered from the industry, my experience with geometry shader is near to not existent, the only geometry shader I ever implemented was the Nvidia solid wireframe shader . Read more ...

De-gamma your texture kid!

Nov 1, 2018 - 3 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 rendered 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 ...