My article Stage3D Pipeline in a Nutshell is a conceptual journey through the phases of the 3D pipeline, but today I’m going to talk about the practical side. What code do you write if you want to transform points and vectors from one space to another? This article will show you how to do that.
Archive for June, 2012
Flash Player 11’s
Stage3D gives you only a few opcodes to do conditional logic and none of them are as effective as the good old
if in AS3. The most unique one of all is the
KIL opcode that discards the pixel being drawn. How does it work? How does it perform? Today we’ll find out!
This week’s article offers another useful utility function:
indexedTrisToString. This function is especially useful when dealing with 3D engines such as those based on
Graphics.drawTriangles. It helps to untangle the complicated indices/vertices format that these API functions require into something much more readable and, therefore, debuggable.
It’s been a while since I’ve posted a utility function, but today I’m breaking the streak and posting a couple of related functions I frequently find useful in debugging:
joinNLabeled. These functions are like
Vector.join, but they group elements of the array to make the resulting string much easier to read.