Stage3D is hugely powerful, but with that power comes a very new and very complicated requirement for many programmers: shaders. Shaders are tiny programs that run on the GPU and are hugely limited compared to fancy CPU-side languages like AS3. For many programmers new to shaders these things are truly mind-bending. They’re even split into two parts: vertex and fragment shaders. Today’s article focuses on the two kinds of inputs to vertex shaders and seeks to explain them and clear up some of the confusion.
Posts Tagged shader
I’ve mentioned the concept of VRAM (video memory) in a few articles, but I still find constant confusion among readers of this site as well as coworkers and colleagues in day-to-day work with
Stage3D. Today’s article will hopefully clear up the differences, dispel some myths, and help you make the best use of both of them.
To draw with Flash Player 11’s
Stage3D API, you must set up the state of various GPU resources before finally calling
drawTriangles. Inevitably, you’ll end up calling
drawTriangles multiple times during a single frame to draw your characters, terrain, sky, and so forth. In between these calls you will change the GPU’s state by calling
set* functions. This article will show you which of these functions can literally cut your app’s performance in half.
Along with Flash Player 11’s new
Stage3D class have come hardware-accelerated 2D rendering engines. Impressive results have already been demonstrated by advanced engines like Starling and ND2D. Today’s article shows a simple
Stage3D-based sprite class to help learn more about how these engines are implemented and provides a simplified alternative to the more complex 2D engines that still delivers hardware-accelerated performance.
Flash Player 11’s new
Stage3D hardware-accelerated graphics API not only allows you to write shaders (custom code to position vertices and color pixels), it downright requires you to do so. To get the lowest level access (and therefore most power) out of your shaders, you write them in an assembly language called AGAL. Read on for a test app that compares the speed of these shader instructions, the fundamental building blocks of all