Hello everyone,
I am having problems running an app which uses some shaders.
The app works nicely if it’s located in the OF folder but when I remove it from there, the app works and run but the shaders don’t.
I tried to put the app in the same folder level of the original OF apps structure but it didn’t work.
I don’t understand why only the shaders have problems even if the folder structure is the same.
I tried to put the same thing on another machine, with OF installed, and even if I put it in the same folder the shaders don’t work. I still can’t figure this out…
Hello Hennio,
thanks for getting back again.
I spent some time running few tests, checking different options. I found out the problem was an addon I am using (ofxLayerMask) which uses its own shaders. So, when I was moving the app+data folder in another location, it was missing the addon shaders.
I copied both app+data and addon folders, keeping the same folders depth and now it seems to work. (see png attached)
The best thing to do is check out what is ofxLayerMask doing to find those shaders. I assume that if its looking for the shaders in its own addon folder its doing something like shaderPath = “…/…/…/addons/ofxLayerMask/src/shader/” blabla…
If you find this in the addon code, you can change it to something more convenient for you, such as shaderPath = “./shaders/” which is where all your shaders are, so you do not depend on the folder structure. (note that shaderPath is just an example im making up, you will have to scan through the addon code to know how it is finding the shader)
After changing the shader paths you can simply copy the shaders in the addon to your folder, so it is all self contained.