actionscript 3 - what's the agal tex syntax? -


here syntax i've read

tex t b - samples texture in b (which should 1 of fs registers) @ coordinates in a, putting resulting colour in t.

but in opensource project code found wrote tex this:

tex ft0.xyzw vi0.xyzw fs0 <flinear,mlinear,clamp,2d,rgba,b:45>//what's bias:45? 

and this

tex ft3, v3, fs0<2d, linear, miplinear,dxt1>//what dxt1, there this? 

which confusing me stuff can put in <> seems no order requirement

thanks hints

i can guess meanings of other flags - aren't in of documentation i've seen, , aren't in stock version of agalminiassembler. gut feeling they're used extended version of agalminiassembler created use specific flash package (like starling or away3d). i'd stick well-documented texture flags - see pdf linked @ end of post.

as order, correct - order not matter when passing tags tex function, assuming using basic version of agalminiassembler provided adobe.

the reason relatively simple: every tag used single 'tex' operation represented single 64-bit field when operation converted bytecode. order doesn't matter since different tags occupy different bits within field. still have trouble when 2 tags occupy same portion of field used @ same time - "nearest" , "linear" example, or "mipnearest" , "nomip" (note conflicting behavior between these instructions!).

check out this pdf if want see ops implemented in current, non-beta versions of flash, or if want further how bytecode assembled before being passed shaders.


Comments

Popular posts from this blog

Issues changing the value of an element in an array in matlab -

vb.net - Alternative to the T-SQL AS keyword -

php - MySQLi binding parameters in a prepared statement doesn't work unless inserted after "WHERE" -