Hi,
I rewrote the first part of AGAL2 script in AGAL1.
This does not cause the strange fluke as detected in the AGAL2 script. And works on mobile as it does on PC.
It affects the same registers in mostly the same way, it just doesn't use the jump conditionals.
There is no bleeding out of the container bounds either (how can that happen at all if the filter is constrained to the playfield?)
I have added the first parts that only look at the .z color register(blue).
How can this produce such different results on mobile? There's a clue in the difference but I don't know it.
For clarity; AGAL1 version works fine on mobile AGAL2 is weird and doesn't restrict itself to the container it is applied to.
Some whizzkid / cyberninja / wizard / overlord-of-AGAL; please help find the part where this goes wrong!!?!!?!
Is it an assembler error perhaps? something in the string manipulation (the .xyzw, for instance, can NOT be addressed as .rgba although the documentation states they should be interchangeable)
Same as in the first post about this here a video and an image of the fluke and the static playfield gradients.
Image: http://imgur.com/a/xZFz5oT
YouTube: https://youtu.be/GFOXmjxdw2E
The agal1 version for just the blue register (z)
mov ft0, v0
tex ft1, ft0, fs0<2d, clamp, nearest, mipnone>
mov ft2.xyzw, fc0.yyyy
sge ft2.xy, ft1.xy, fc0.ww <- from here
seq ft2.z, ft1.z, fc0.y
add ft2.xyz, ft2.xyz, ft1.xyz
add ft2.x, ft2.x, ft2.y
add ft2.x, ft2.x, ft2.z
add ft2.x, ft2.x, fc0.w
sge ft2.xyz, fc0.zzz, ft2.xxx <- to here = detect blue register only pixels
mul ft2.z, ft2.z, fc1.y
sub ft1.z, ft1.z, ft2.z <- subtract the looping variable from updateAGAL in main
slt ft2.x, ft1.z, fc0.y
add ft1.z, ft1.z, ft2.x <- add 1 if < 0
mov oc, ft1
<- move to output
The agal2 version for just the blue register (z)
mov ft0, v0
tex ft1, ft0, fs0<2d, clamp, nearest, mipnone>
ife ft1.x, fc1.w <- from here
ife ft1.y, fc1.w
ifg ft1.z, fc1.w <- to here select blue only pixels
sub ft1.z, ft1.z, fc1.y < subtract looping variable
ifl ft1.z, fc1.w
add ft1.z, ft1.z, fc1.x <- add 1 if < 0
eif
eif
eif
eif
mov oc, ft1
<- move to the output