w00t
Jump to navigation
And there was much rejoicing!
The extremely tricky way in which it introduced a bidirectional dependency, completely different from regular header files, made for great pillow talk though. But alas, no more!
So here's an obscure D3D9 compiler error that google gives barely 10 hits for:
"error X4509: invalid register semantic 'i0', or variable must be bound to multiple register banks (c register binding required)"
[Read More!]
Planets have always been
the poster child for procedural rendering, or shaders approximating that, and the latest expansion to Eve added some great examples. There's now a blog post about
how it works. Too bad I wasn't on this task, it sounds like the team was having a blast :)
A quick visual summary of the three main types of Compute Shader IDs. Nothing new let alone spectacular here, just a quick reminder for myself. I like pictures.
[Read More!]
I've contacted the authors of the truly excellent
Advanced Global Illumination book to forward a couple of Errata; until their busy schedules allow an update, here's a copy for Google.
[Read More!]
Link to
deliberately terrible code for a calculator that appears to work, but really doesn't. The comments are nonsensical, it "optimizes" adding two floats, subtracts using strlen, multiplies using addition, caches the result of division, has four names for the same thing, is inconsistent, and is just generally a disaster for readability while appearing to actually make sense and follow reasonable guidelines. Silliness from the OMGWTF contest two years ago.
Google video called OO Design for Testability.
I'm a big fan of unit testing, even though I rarely do it in production code (blame management). Why? Because just the possibility that some code
might be tested in isolation automatically works as a very strong repellent against erring on the side of singletons, other forms of global state, God classes, or chasing around all sorts of references -- an effect I've now learned is called a
Law of Demeter Violation.
In this regard, testing is similar to exceptions in C++, another great example of the Just Pretend Trick: if you pretend you use exceptions, design automatically gravitates toward things like RAII, and that's a definite plus. The fact that you never actually use exceptions is irrelevant.
Also; I used to be enamored with the environment pattern, which passes a service locator to anybody that needs it; after Jon Watte. But what the guy says in the video matches my experience with it; it's hard to identify the exact subset of dependencies that anybody needs, and so you don't know how to stub it out properly without looking at the user code. So that's something to reconsider...
In Episode 4a of this
very entertaining MIT Course on LISP, Gerald Jay Sussman talks about a program to simplify algebraic expressions. Rather than writing such a program, he writes a general system which you can feed rules, and out comes a transformed expression. So instead of hardcoding that "x + 0" is just "x", a general rule says "replace
anything followed by '+' followed by '0' with just that
anything". Letting this rulebook run on "x + 0" automatically gives you "x".
Naturally, while watching that, I got a nasty itch to try this in C++,
at compile time. Disclaimer: this is a nothing-on-TV-again hack, so don't take this too seriously. I tested with one (count'em, one) expression, and it seemed to work...
[Read More!]
Here's a few screenshots from the basic PRT technique
derived earlier.
[Read More!]
Bjarne Stroustrup explains why the Concepts feature was just dropped from the next C++ version at the last committee meeting in Frankfurt. I'm a bit disappointed since I hoped that it would help us get rid of the many hacks that exist to push template metaprogramming, replacing them with sane and explicit type manipulations. But then again, this feature really is big and complex, so it's maybe not a bad idea to let it cook a bit longer and see what comes out in the end.
This text brings a number of concepts related to PRT together, trying to turn them into a straight A-to-Z derivation of the basic technique (diffuse, no bounce, no scattering). ”Straight” here does not mean simple; this is not really a tutorial. Depending on how much you already know about the subject, this is a math cheat sheet, a quick refresher, or a starting point to learn what's involved.
Note: for worry-free reading and printing, you can also use
this pdf file which is exactly the same thing. The html below is autogenerated so it may or may not look very good in your browser.
[Read More!]
Today I thought I'd hack up a simple dialog system. It's pretty basic, not much to say, but I just wanted to share this image, generated with
dot from the graphviz package.
[Read More!]
I just discovered, by accident of course, that ctrl-delete is the same thing as ctrl-shift-rightarrow followed by delete. Cool!
A couple years ago I bought the book
Shadows of the Mind by Roger Penrose. In the first part, he uses Goedel's incompleteness theorem (and a bunch of other results about computability and things like the halting problem) to argue that the human mind cannot be the result of a straightforward computational Turing complete process. Which is an interesting position in and of itself, but naturally also leads to the question, if consciousness is embedded in reality (ie. you do not want to give up
materialism completely), then what runs it? The answer is in the second half of the book, which I haven't read yet, but I just found this
Google TechTalk by Stuart Hameroff, who worked with Penrose, that basically summarizes their answer. The big words fly by real fast, but it is an absolutely fascinating talk, if you dig this stuff. Youtube Tip of the week!