Closed cprkv closed 3 days ago
GLSL as a target is only experimental. I don't think GLSL ES is supported even as an experimental feature.
Our glsl generation is only for generating Vulkan flavored glsl. Using that glsl output for OpenGL es may work if you simply replace that version line with something that gles expects, but this isn’t an officially supported use scenario. We can reconsider the support level for traditional OpenGL flavored glsl as a target if there are sufficient need for this.
I managed to get OpenGL ES shader via spirv-cross:
.\slangc.exe test.slang -profile spirv_1_5 -o test.spv -entry main
.\spirv-cross.exe test.spv --es --version 300 --stage vert --output test.vert
So closing the issue.
I need to write GLSL shaders with slang (
#version 300 es
) and it looks like slangc doesn't support output to such format. I try using this command:but it outputs shader with
#version 450
. What should I use to output#version 300 es
shaders?