Hi, On Monday, June 1, 2015 at 3:53:50 PM UTC+2, [email protected] wrote: > > When you say legacy do you mean IE9/10? Or do you mean browsers where > WebGL doesn't work well (or at all) due to GPU/driver/blacklisting issues? >
I mean IE9/10. > There is a project called cwebgl (http://cimaron.net/projects/cwebgl/ and > https://github.com/cimaron/cwebgl) which does WebGL software rendering in > pure JavaScript. It even compiles glsl down to JavaScript. I have attemped > to use this library before, but without much success. Still, it may be a > useful starting point. > I found that indeed. I'll investigate and I'll report back here. > I think glsl-unit can also compile glsl to JavaScript ( > https://code.google.com/p/glsl-unit/). > Interesting. AFAIK it's what cwebgl uses internally. I'd rather use GLSL-optimizer (https://github.com/aras-p/glsl-optimizer), since it's focused on delivering optimized GLSL code and thus more performance oriented. It was used before to ouput other languagues, such as AGAL for Adobe Flash 11+. So it should be fairly easy to output ASM.js code indeed... And it definitely compiles using Emscripten since I did it a few months ago... > As jj says, maybe it would be better to cheat and do something simpler :) > Didn't one of the previous versions of Minko compile ActionScript down to > AGAL? Maybe a similar approach could work? You could write the shaders in a > subset of JavaScript (which could be run by any JavaScript VM) and then > compile to glsl if you have a working WebGL implementation. > That's a very interesting idea. In the end, OpenGL is mainly about states handling and performing proper rendering through shaders. If we can get the shader part thing to run, then it should be fairly simple to handle the states properly. Plus rendering should be easily parallelized using web workers : each worker could simply output a framgnet of the final image. Thank you all for the help. I think I'll try something like this rather than LLVM-pipe. -- You received this message because you are subscribed to the Google Groups "emscripten-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
