Skip to content

Add support for external shader translator #483

@GuillermoAmbar

Description

@GuillermoAmbar

An example is to use glslang program to translate a OpenGL or OpenGL ES shader to spir-v, then generate a OpenGL ES shader source from spir-v shader by using spirv-cross program.

I have tested to convert OpenGL 3.3 shaders to OpenGL ES 3.1 and 3.2 by adding an optional plugin loader on shader source loader function.

It is not ready for use because on my test plugin I call glslang program to generate a spir-v file, and then call spirv-cross to generate opengl es shader code from spir-v source, it uses an intermediate cached file on disk, I speed up things by creating a little 16 MB ramdisk for temporary store spirv generated files.

I will try to use glslang and spir-v libraries for create a functional plugin, however time for that is undeterminated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions