ncannasse / hxsl

Haxe Shader Language, a high level 3D shader language for Haxe
86 stars 10 forks source link

multiple texture usage in hxsl #31

Open davyzhang opened 10 years ago

davyzhang commented 10 years ago

I write fragment func like this function fragment(tex0:Texture, tex1:Texture, tex2:Texture, tex3:Texture)

but the problem is I don't the exact number of textures will used here

currently I uploaded 8 tex with some empty bitmapdata textures

but in agal I can dynamically make the agal opcode string to achieve this for (var x:int;i < textureCount;i++){ "tex " + ftColor + "," + + "," + fsList[i] + "<2d,repeat,miplinear,linear>", }

The thing I wanna achieve is similar like this: http://blog.flash-core.com/?p=493

here's the google group thread https://groups.google.com/forum/#!topic/haxelang/CF4ibEta5x4