Archive for June, 2012

Stepping Through The Stage3D Pipeline

Tags: , , , , , , , ,

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.

Read the rest of this article »


Stage3D KIL Command

Tags: , , ,

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!

Read the rest of this article »


Utility Function: indexedTrisToString

Tags: , , , , , ,

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 Context3D.drawTriangles or Graphics.drawTriangles. It helps to untangle the complicated indices/vertices format that these API functions require into something much more readable and, therefore, debuggable.

Read the rest of this article »

No Comments

Utility Functions: joinN and joinNLabeled

Tags: , , , , , ,

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: joinN and joinNLabeled. These functions are like Array.join and Vector.join, but they group elements of the array to make the resulting string much easier to read.

Read the rest of this article »