actionscript-3pixel-shaderstage3dagal

Stage3D, AGAL - vertices' and textures' coordinate systems


I've been trying to work with more complicated shaders, and have run into issues with the coordinate systems used by the vertex shader and texture sampler. In short: they don't seem to make any sense, and when trying to test them I end up getting inconsistent results. To make matters worse, the internet has little in the way of documentation, and most of the information I've found seems to expect me to know how this works already. I was hoping someone could clarify the following:

EDIT: From my tests, I believe the answers are:


Solution