Hey, I was wondering if there is any way to use Unity shaders when using the low level native rendering interface from a c++ and openGL plugin. I’m doing some rendering from a plugin and wish to integrate it with the lights in my scene. I would rather not have to re-implement all the complex lighting stuff in unity.
From what I can tell if I can’t just easily tap into the unity shader pipeline from my native plugin, then I will need to retrieve a list of all the lights affecting my object, make them available to my GLSL shader, and then perform all the correct lighting calculations from my own custom GLSL shader. Any shortcuts around this? Is there a simple way of getting access to all the variables that unity makes available for “free” when writing GLSL shaders in editor?
Ideally I would like to just be able to write a typical ShaderLab shader and pass the GLSL compiled version into my native plugin and just call glUseProgram(program); and have everything magically work, but I’m guessing it’s not going to be quite that easy.