Questions tagged [agal]

The Adobe Graphics Assembly Language (AGAL) is an assembly language used to create vertex and fragment shaders for use in Adobe Flash and Adobe AIR applications.

The Adobe Graphics Assembly Language (AGAL) is an assembly language used to create vertex and fragment shaders for use in Adobe Flash and Adobe AIR applications.

54 questions
1
vote
1 answer

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…
Conduit
  • 2,675
  • 1
  • 26
  • 39
1
vote
1 answer

AGAL: m44 instead of Matrix3D.append()

How to move such computation: var a : Matrix3D = ... var b : Matrix3D = ... a.append( b ); within shader? My current approach: setProgramConstantsFromMatrix( VERTEX, 0, a, true ); setProgramConstantsFromMatrix( VERTEX, 4, b, true ); "mov vt0,…
Slaus
  • 2,086
  • 4
  • 26
  • 41
1
vote
1 answer

what's the agal tex syntax?

Here is the syntax I've read tex t a b - Samples the texture in b (which should be one of the fs registers) at the coordinates in a, putting the resulting colour in t. but In some opensource project code I found someone wrote tex like this: tex…
davyzhang
  • 2,419
  • 3
  • 26
  • 34
1
vote
1 answer

Shader about Skeleton Animation in AGAL

In my project, we push a part of the matrix to constant registers for skeleton animation and access them with matrix index in shader which also passed by constant registers. a sample shader with glsles: uniform highp vec4 mPalette[60]; …
greeniris
  • 11
  • 1
1
vote
1 answer

Writing only red color component to AGAL pixel shader output

I want a pixel shader om AGAL that instead of simply copying the color passed to it from the vertex shader to the output, only copies the red component from the passed color and sets the green and blue components to zero. In pseudo code: temp =…
1
vote
1 answer

Flash and AGAL: How to properly interpolate normal vectors

I am trying to write a set of shaders to be able to draw the edges of surfaces (not polygons!), like in the game Echochrome. From what I can remember from graphics programming, the technique for doing this is to make a multi-pass render. The first…
sadakatsu
  • 1,255
  • 18
  • 36
1
vote
3 answers

Can I use AS3 Stage3D AGAL to achieve CUDA like processing?

I have a program what detects a ball in a 320x240 stream runtime, but if I stream bigger resolution, it gets too slow. I'm assuming if I could use the GPU to calculate each pixels (with their neighbor frames, and neigbor pixels) it would be faster.…
csomakk
  • 5,369
  • 1
  • 29
  • 34
1
vote
1 answer

Simple flat shading using Stage3D/AGAL

I'm relatively new to 3D development and am currently using Actionscript, Stage3D and AGAL to learn. I'm trying to create a scene with a simple procedural mesh that is flat shaded. However, I'm stuck on exactly how I should be passing surface…
1
vote
2 answers

How to draw a line on a bitmap in Stage3D using Agal?

How can I draw a line on a bitmap in Stage3D using Agal? Can someone provide a code example?
Howard
  • 3,648
  • 13
  • 58
  • 86
0
votes
1 answer

AGAL and the varying register

I just wanted to do how this works. So I am in the vert shader. I store a UV-coord from va1 to v1. In the frag shader, an interpolated texture coordinate now is available in v1 to sample. Are there connections under the hood, like semantics, to…
Ilya
  • 1,215
  • 1
  • 14
  • 25
0
votes
1 answer

How use Immediate number in AGAL

For example, I want to output red color in fragment shader. HLSL: return float4(1,0,0,1); asm: def c0, 1, 0, 0, 1 mov oC0, r0 How to implement this in AGAL?
solid
  • 63
  • 6
0
votes
0 answers

Inverting texture color with AGAL

I've been using the Genome2D library and wanted to create a filter that inverts all color. After reading Adobe documentation, I can't seem to figure out what's going on with the alpha channel since .rgba doesn't even seem to work. This Genome2D…
dinorider
  • 191
  • 10
0
votes
1 answer

Pass position to fragment shader in AGAL

I am trying to get into shading with AGAL. I have set up a full screen quad to be drawn with shader programs, but I ran into something unexplainable. I have these vertices var vertices:Vector. = Vector.([ - 1, - 1, 0, - 1, - 1,…
0
votes
1 answer

Proper way to apply translation to vertices

I have the simple vertex shader: m44 op, va0, vc0 mov v0, va1 and the fragment shader: mov oc, v0 I pass this vertices to it: x y z w r g b -0.3, -0.3, 0, 1, 1, 0, 0, 0, 0.3, 0, 1, 0, 1, 0, 0.3, -0.3, 0, 1, 0, 0, 1 The result…
patrick
  • 45
  • 2
  • 5
0
votes
1 answer

How do AGAL registers get added or subtracted when they 'contain' 3D vectors?

I'm working on adding a shadow to planetary rings in a space game I'm developing. For this I need to calculate where a cylinder (the shadow of the planet) intersects with a plane (the mesh of the rings). I'm being impeded by not being able to see…
moosefetcher
  • 1,841
  • 2
  • 23
  • 39