w00t

08/01/13
MLP - Go concurrency

Another interesting programming talk, via @ryg.
03:31:58 - zwans - No comments - peirz
Tag: link / programming -

06/01/13
MLP - C++ keyword fun

"const now means the same thing as mutable".

Wait, what?
00:22:25 - zwans - No comments - peirz
Tag: link / programming / cplusplus -

11/12/12
Triangle Setup in CudaRaster

On our trip through CudaRaster, Samuli Laine and Tero Karras' open sourced implementation of their High-Performance Software Rasterization on GPUs paper, it's time to check out triangle setup. This is in fact the first step in the process, so we're going backwards here. Each thread takes care of one triangle, so there's few headaches this time in keeping the GPU busy. The challenge is efficient triangle setup, clipping, and correct subpixel snapping and culling.

[Read More!]
16:28:18 - zwans - 2 comments - peirz
Tag: programming / graphics / rendering / math / cudaraster -

26/11/12
Assembly cheat sheet

I keep forgetting this fine print, so I'll just type up a cheat sheet here. Most of it comes from digesting the fantastic agner.org. That doesn't guarantee I got everything 100% correct though.

[Read More!]
13:40:51 - zwans - 6 comments - peirz
Tag: programming -

23/11/12
Coarse Rasterization in CudaRaster

In the quest to demistify the high performance magic of CudaRaster by Samuli Laine and Tero Karras, it's time for a closer look at the coarse rasterization stage. As the paper explains, this stage merges the per-bin queues, and adds the triangles to a queue for each coarse tile it overlaps. Thanks to the authors' generous open-sourcing of the code, we can take a look at how that works exactly.

[Read More!]
17:19:45 - zwans - No comments - peirz
Tag: programming / graphics / rendering / deferred / cudaraster -

14/11/12
Annotating CudaRaster

In the CudaRaster project, Samuli Laine and Tero Karras have implemented a complete triangle rasterizer in Cuda. They explain how it works, and why, in their excellent High-Performance Software Rasterization on GPUs paper. What's more, they've open sourced the implementation, which is fantastic. The code is full of little and big gems, highly efficient ways and tricks to keep those cores busy. It took me a while to wrap my head around it, so in this post I want to share my attempt at demystifying the bin rasterizer phase a little, just to start somewhere.

[Read More!]
16:44:50 - zwans - No comments - peirz
Tag: programming / graphics / rendering / deferred / cudaraster -

16/10/12
JavaScript test 2

Man it's like 1992 all over.

[Read More!]
23:51:53 - zwans - 8 comments - peirz
Tag: programming -

15/10/12
JavaScript test

Hm let's see if this works.

[Read More!]
23:58:58 - zwans - 4 comments - peirz
Tag: programming -

11/10/12
Musings on auto, lambda

Say, what's up with these new fangled toys...?

[Read More!]
20:06:15 - zwans - 4 comments - peirz
Tag: cplusplus / programming -

06/09/12
Amuse Bouche

Posting code for all to see is near suicidal, especially if you didn't really test it all that much... but what the hell, who cares :)

[Read More!]
11:32:49 - zwans - 2 comments - peirz
Tag: programming / humor / link -

24/09/11
Notes on template

Personal notes on templates / cheat sheet. Not sure how much of this is still true or accurate in C++11.

[Read More!]
14:42:44 - zwans - No comments - peirz
Tag: programming / cplusplus -

18/03/10
MLP - NVidia Parallel NSight

Ohhhhh yes!! Do WANT.
14:23:55 - zwans - 4 comments - peirz
Tag: link / graphics / programming -

17/03/10
MLP - C++0x - export is gone!

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!
20:13:27 - zwans - 1 comment - peirz
Tag: link / programming / cplusplus -

25/02/10
Invalid register semantic

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!]
18:19:47 - zwans - No comments - peirz
Tag: programming / graphics -

20/01/10
Planets in Eve

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 :)
22:54:25 - zwans - 1 comment - peirz
Tag: link / programming / games / graphics / rendering / ccp -

03/01/10
DX11 IDs

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!]
19:21:23 - zwans - 1 comment - peirz
Tag: programming / graphics / rendering / gpu -

24/10/09
Errata Advanced Global Illumination

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!]
20:27:02 - zwans - No comments - peirz
Tag: programming / graphics / global illumination -

11/10/09
Bad code

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.
11:33:24 - zwans - No comments - peirz
Tag: link / humor / programming -

09/10/09
MLP - OO Design for Testability

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...
22:28:04 - zwans - No comments - peirz
Tag: programming / link -

02/09/09
Faking basic Lisp in C++

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!]
23:46:39 - zwans - No comments - peirz
Tag: programming / link / cplusplus -
| Next»