by baggers
I seem to oscillate slowly between needing to create and needed to consume media. This week I've either jumped back to consume or I'm procrastinating.
Either way I've not been super productive, let's start with the consumption:
Listened to Iceberg Slim's biography - On stage one time Dave Chappele was talking about how the media industry worked and likened it to pimping. He said this book pretty much explained the system. It's damn depressing.
Watched some TED talks. Filtering out all the TEDX shit really makes the site more valuable
I've also been listening to a book called 'The Information: A History, a Theory, a Flood' again. It's an outstanding walk through our history of understand what information is. From african drums, to morse code, to computers, to genes. This book rules. Read/Listen to it. I've been repeating 2 chapters this last week trying to bake them into my brain. The first was on entropy (and how information & entropy are the same), and the second is on genes and how information flows from and through us.
The first order of business was to look at PBR. Previously I had got deferred point lights to work, however I failed hard at the IBL step. Luckily I rediscovered this tutorial as understood how it fit into what I was doing. Last time I had tried to stick to one paper as (in my ignorance) each approach felt very different to me.
I wrote the shader in lisp and immediately ran into a few bugs in my compiler. This sucked and the fixes I made werent satisfying. The problems were dumb side-effects of how i was doing my flow analysis, I'm pretty sure now that I want to get my compiler-time-values
feature finished and then rewrite the code that uses the flow analyzer to use that instead.
I then ran into a few rendering issues. The first turned out to be a bug in my implementation of a function that samples from a cross texture (commonly used for environment maps). The next 2 I haven't fixed yet:
I checked the generated glsl and it looks fine. I'm struggling to work out how I'm screwing this up. I guess it could be that I have a bug in how I'm binding/unbinding textures and this is causing a flush..that could account for the speed...and maybe the graphical fuckups? I don't know man.
Despite that it feels good to be back in that codebase. One thing that really stood out though was how much first-class functions could make the codebase cleaner and more flexible. I had started that feature partially for fun but more and more it seems it's going to be very useful.
Given that I spent last night digging into that branch of my compiler. I decided that even without support for closures it would still be a good feature. So I did the following:
I then spent a little time looking into how to generalize my compile-time-value feature, this will mean I can not only pass around functions but values user defined types. I'm going to use this for vector spaces. I realized that this doesn't currently have enough power to cover all the things I could do with flow analysis, this is a bummer but at this point I had drunk too much wine to come up with good ideas so I called it a night.
Next week I need to crack the new version of the spaces feature, get that merge in and get back into the PBR.
.. Oh and Christmas :p