haxiomic / haxe-glsl-parser

GLSL ES 1.0 parser in Haxe
MIT License
26 stars 7 forks source link

feature: Support GlslangToSpv #15

Open longde123 opened 7 years ago

longde123 commented 7 years ago

have a plan? GLSL ES -> SPIRV transpilation :)

like this

https://github.com/KhronosGroup/glslang/blob/master/SPIRV/GlslangToSpv.cpp

haxiomic commented 7 years ago

That would be sweet, It'd take a while though. Easiest thing to do in the short term is to use a macro to execute linked the code GLSL -> SPRIV as an external process. Another thing worth looking into is HXSL, which is a haxe-based shader language designed for shader or bytecode generation (see the AgalOut.hx for flash shader bytecode)

longde123 commented 7 years ago

I think a backend SPIRV generate more fun

SPIR-V based GLSL cross-compiler like this https://github.com/Kode/krafix

longde123 commented 7 years ago

whole SPIRV work process in haxe

longde123 commented 7 years ago

Good idea for flash bytecode , backend HXSL only need GLSL ES ast -> HXSL ast