Open jobez opened 7 years ago
Hi!
Yeah ES support would be interesting, however I think there will be a lot more fiddly details we would need to get right. To start though, someone needs to go through glsl-spec and add version info for GLES.
If your hack is working for you then it's probably best to stick with it for now but I'd rather not add it in to Varjo as supporting it will get tricky. It'll be better for us to gradually fix the problems in the correct places (like emitting attribute
& varying
based on version)
https://www.khronos.org/registry/OpenGL/index_es.php
Note to self: GLSL_ES_Specification_3.00.pdf has the changes from regular glsl-300. Super useful.
Hello! Hope all is well :)
A couple weeks ago I looked into the details of abstracting glsl/glsl es shaders and found this blog post: https://goharsha.com/blog/abstracting-glsl-and-glsl-es-shaders/ (praise google).
I was able to slightly revise the
gen-shader-string
to have#define
directives to give glsl es the syntax it needs to be happy. My hacky change looks like this:I would be happy to submit a PR for adding glsl es support--just wanted to reach out if you had suggestions of the best way to optionally add these directives. I was able to use the hack above to get some varjo glsl goodness on my personal webpage http://johannbestowro.us. Pretty cool!