The main() function should be in a seperate glsl shader and the brdfs should reside in another shader as well. The brdf shaders can be put in a folder under brdfs. The BRDFs will contain the saved BRDFs as well as our default BRDFs. With this issue, we need to define multiple pipelines. Pipelines are referred by the brdf shader file name.
I have done this issue, now we have a real-time shaders loading as well as, shader files are distributed into main.frag and brdfs/*.brdf. The current implementation is slow but it works for now.
The main() function should be in a seperate glsl shader and the brdfs should reside in another shader as well. The brdf shaders can be put in a folder under brdfs. The BRDFs will contain the saved BRDFs as well as our default BRDFs. With this issue, we need to define multiple pipelines. Pipelines are referred by the brdf shader file name.