HxSL Studio Demo
A few months ago I worked on HxSL which is a 3D shader language. I wanted people to be able to see how HxSL works and give it a try without installing haXe and writing code.
So I came up with the idea of HxSL Studio which is an online tool (entirely written in haXe) using both Flash and Javascript.
With HxSL studio, you can modify both vertex and fragment shaders in an HTML page. The shader text get sent to flash component using haXe Remoting on each change. Then I'm using HScript to parse the text before using HxSL compiler to generate on-the-fly AGAL bytecode.
Thanks to haXe being very fast you can get realtime feedback on errors. Works very nice.
If you have an error, it will be sent back from Flash to JS so it can be displayed. If you click on the error you will select the HxSL part that is causing the error.
You can also see the AGAL output that you can paste in your AS3 code in case you're not lucky enough to use haXe for your daily job ;)
This is actually not a fulled feature Studio as I wanted to built it. You have only one primitive which is a simple axis-aligned-cube and only 4 possible shader variables :
mpos: position matrix, rotate over timemproj: camera projection matrixtime: time scalartex: perlin noise texture
I wanted to add an additional tab where you could define your own variables and modify them, then change the primitive among cube/sphere/etc..., and also upload you custom textures, but I'm lacking time to work on it so I wanted to release this working demo instead of waiting it to be complete.
If anybody else want to simply read the source code or is willing to implement the missing features, don't hesitate, it's pretty small so far ( 3 KB haXe/JS + 9 KB haXe/Flash - excluding libs) and available here : http://code.google.com/p/hxformat/source/browse/#svn/other/studio
Enjoy !
Awesome!
Thanks for sharing source.
Niiiiiceee!
It would be very nice such an application to be able to import models or primitives and switch between materials (something like nvidia fx composer I mean)
Also, I see the agal tab shows invalid agal register names (t, c, out). I think the problem is that converted register names are shown instead of native ones.
wonderful job,
ciao
pigiuz
All my games are written in haXe, and for sure all my new 3D games! THANKS!!
This is absolutly fantastic you are a genious Man!!!
But I have been thinking that Haxe really need an editor just like unity were you can drop and assign your code on an object easily.
It is a wonderfull language but when you have tried Unity3D were you have Joystick input, environment map, compile for mac, window, the web and so on it is hard to come back to Haxe and do everything by hand.
I do admire your work but I think it time to go a step further specially now when Unity3.5 is planning to export for the new Flash Player.
Think will be easier for people to model in blender texture in gimp/inkscape bring it all to unity and publish in a matter of weeks!!!
less wait and see what surprise nice Haxe will bring ..
Long life to Haxe.
@pixnlove : once we have the Unity Flash API, I guess it will be possible to access it from haXe as well. Another option in the works (not by me but by @cwaneck) is to compile haXe to C#
its great, all this tools are necesary, adobe had launched adobe edge, a tool that generate animations web based in html5, css, javascript from a design, its useful. Would be great something like that haxe based, would be the final product, server side haxe, desktop in haxe, 3d in haxe and web client side only haxe, 100% pure haxe, no html, no css, do not need more than a single language for everything, it would be a global event, a dream of many come true.
thank, and sorry for my english
@Nicolas Cannasse
Have you plans to continue support HxSL and Studio?
Main trouble - indexed access.
Patch by sledorze - not works.
Thanks.
Yes I need to find time to add indexed access to HxSL, I will review the patch once I'm back working with 3D (hopefuly in a few weeks)
Studio open error - 404 not found
Oops, looks like I lost the directory while changing hosting. Will try to put it back with an updated version.