This post talks about how to render images like the below in real time using ray tracing. Some realism in the images come from reflection and refraction, but the real icing on the cake comes from Fresnel, total internal reflection … Continue reading

# Demofox

The last post showed how to fit a equation to a set of 2d data points, using least squares fitting. It allowed you to do this getting only one data point at a time, and still come up with the … Continue reading

This Post In Short: Fit a curve of degree N to a data set, getting data points 1 at a time. Storage Required: 3*N+2 values. Update Complexity: roughly 3*N+2 additions and multiplies. Finalize Complexity: Solving Ax=b where A is an … Continue reading

This is an extension of a paper I wrote which shows how to use the linear texture sampling capabilities of the GPU to calculate points on Bezier curves. You store the control points in the texture, then sample along the … Continue reading

While it’s true that the GPU texture sampler can evaluate digital logic circuits, it turns out there’s a much better and simpler way to evaluate logic with textures. That better and simpler way isn’t even that useful unfortunately! This post … Continue reading

This is an extension of a paper I wrote which shows how to use the linear texture sampling capabilities of the GPU to calculate points on Bezier curves. You store the control points in the texture, then sample along the … Continue reading

This is a “soft tech” post. If that isn’t your thing, don’t worry, I’ll be returning to some cool “hard tech” and interesting algorithms after this. I’ve been abusing the heck out of the GPU texture sampler lately, so be … Continue reading

Writing good code is something all programmers aspire to, but the definition of what actually makes good code can be a bit tricky to pin down. The idea of good code varies from person to person, from language to language, … Continue reading

Homomorphic encryption is a special type of encryption that lets you do calculations on encrypted values as if they weren’t encrypted. One reason it’s desired is that secure computing could be done in the cloud, if practical homomorphic encryption were … Continue reading

I’m a windows PC game developer using MSVC 2015 update 1, working in C++. More and more, I hear people talk about how great clang is, and that it generates much better code than MSVC, among other niceties. I have … Continue reading