Category Archives: Graphics Tricks

On Error

Doing my best impersonation of someone who blogs with more regularity than I really do… I glossed over (flubbed?) the error analysis a little in my last post, and should really do a better job. I’ll look at CLEAN/LEAN mapping, … Continue reading

Posted in Graphics Tricks | 3 Comments

Shiny and CLEAN

Inspired by Stephen Hill’s post over on his self shadow blog, I wanted to put down some thoughts about LEAN mapping and CLEAN mapping for specular highlight filtering. About a year and a half ago, Dan Baker and I published … Continue reading

Posted in Graphics Tricks | 3 Comments

Graphics Trick: Schlick Approximation

Almost every graphics game developer I’ve met knows Schlick’s approximation for Fresnel reflectance. This approximation has all the features to be well used in games. It looks visually equivalent to the real Fresnel computation for unpolarized light, while being way … Continue reading

Posted in Graphics Tricks | 2 Comments

Graphics Trick: Quaternion Rotation

Quaternions are an extremely handy representation for rotations. Unfortunately, they fall into a slightly dusty corner of math, so often seem just a little scary. It’s good to understand what they mean, at least for rotations, when it makes sense … Continue reading

Posted in Graphics Tricks | Comments Off

Graphics Trick: Fresnel Environment

Today, a look at Fresnel-modulated reflections. Hardly a secret trick, but it makes a surprising difference for somewhat shiny objects. Fresnel reflectance is the property that glancing reflections are stronger than head-on reflections. It’s particularly noticeable in surfaces like water … Continue reading

Posted in Graphics Tricks | 1 Comment

Graphics Trick: GPU Random Numbers

This one is based on our recent High Performance Graphics Paper, “GPU Random Numbers via the Tiny Encryption Algorithm“, by Fahad Zafar, Aaron Curtis and Marc Olano. Often you want a stream of random numbers in a shader. On the … Continue reading

Posted in Graphics Tricks | Comments Off

Graphics Trick: Nonlinear transformations

Short one today, just a note on nonlinear transformations. The usual translations, rotations and scaling transformations can all be described as a linear transformation (= matrix multiply). Even linear blend skinning, which blends between per-bone linear transformations is effectively piecewise … Continue reading

Posted in Graphics Tricks | 1 Comment

Graphics Trick: Distributing stuff

Sometimes you want to uniformly distribute some objects over an area. Maybe they’re trees, maybe just blades of grass, maybe an army of guys. Whatever they are, there are a bunch of ways you could try. Here are a few. … Continue reading

Posted in Graphics Tricks | 2 Comments

Graphics Trick: Homogeneous fun

Anyone who’s done any 3D graphics knows how to use homogeneous coordinates for translation and perspective, but they’re good for other places where you’d rather put off a division or avoid it entirely. Basic homogeneous coordinates use four coordinates (I’ll … Continue reading

Posted in Graphics Tricks | Comments Off

Graphics Trick: Polygon Area

This time, how about polygon area (plus circular loops). The area of a 2D triangle is easy, it’s just half the magnitude of the cross product of two edges where you assume the z component is 0: |cross((v1−v0),(v2−v0))| The sign … Continue reading

Posted in Graphics Tricks | 1 Comment