Can hxsl be compiled to android /ios ?

102 views
Skip to first unread message

davy zhang

unread,
Jan 26, 2014, 2:04:04 AM1/26/14
to haxe...@googlegroups.com
I am web base multiple player online game developer, I have some shaders wrote in agal already. I am willing to rewrite it in hxsl again. But I wanna know if hxsl can compile to android/ios as native as something like glsl shader or not.

Becuase I don't want to rewrite these shaders again in nearly future :D

Thanks

Nicolas Cannasse

unread,
Jan 26, 2014, 3:26:25 AM1/26/14
to haxe...@googlegroups.com
Hxsl2 does not provide GLSL output. Hxsl3 which is included in the Heaps
branch of h3d does support both runtime multiples shaders linking and
GLSL output, see https://github.com/ncannasse/h3d/tree/heaps

Best,
Nicolas

davy zhang

unread,
Jan 26, 2014, 3:58:52 AM1/26/14
to haxe...@googlegroups.com
Thanks so much for your work Nicolas. 
But I still make this clear, if it's possible to run native code on ios/android with hxsl outputed as glsl when hxsl3 is ready?

Thanks again for your great work.

davy zhang

unread,
Jan 26, 2014, 4:19:14 AM1/26/14
to haxe...@googlegroups.com
And one more question. Did openfl use hxsl to write shaders ? I learned from their page said they use opengl like api and supported glsl directly, if I understand it correctly.

Nicolas Cannasse

unread,
Jan 26, 2014, 4:53:59 AM1/26/14
to haxe...@googlegroups.com
Le 26/01/2014 09:58, davy zhang a écrit :
> Thanks so much for your work Nicolas.
> But I still make this clear, if it's possible to run native code on
> ios/android with hxsl outputed as glsl when hxsl3 is ready?

Yes.

> And one more question. Did openfl use hxsl to write shaders ?
> I learned from their page said they use opengl like api and
> supported glsl directly, if I understand it correctly.

OpenFL is not using HxSL, I think their shaders are at a kind low level
so not user-definable unless you use the GLView API.

Best,
Nicolas

sergey miryanov

unread,
Jan 26, 2014, 6:17:03 AM1/26/14
to haxe...@googlegroups.com

OpenFL uses WebGL like shaders. You can found couple examples in lime repository on github.

26.01.2014 15:19 пользователь "davy zhang" <davy...@gmail.com> написал:
--
To post to this group haxe...@googlegroups.com
http://groups.google.com/group/haxelang?hl=en
---
You received this message because you are subscribed to the Google Groups "Haxe" group.
For more options, visit https://groups.google.com/groups/opt_out.
Reply all
Reply to author
Forward
0 new messages