Stremik Posted July 8, 2003 Share Posted July 8, 2003 To compile my shader I needed to include rmannotes.sl file in it. So, I've put this line at the beginning of the shader code #include "rmannotes.sl" and then I placed rmannotes.sl file in prman's include directory. When I tried to compile shader,... shader.exe didn't find it there and I had to move it to the directory where the shader I was working on resided. Than it worked. Why so? Quote Link to comment Share on other sites More sharing options...
Mario Marengo Posted July 10, 2003 Share Posted July 10, 2003 When I tried to compile shader,... shader.exe didn't find it there and I had to move it to the directory where the shader I was working on resided. Than it worked. Why so? The "current working directory" is part of prman's shader path by default, that's why it could find it after you moved it to your shader's location. You *can* put the include files anywhere, though. You just have to tell prman where to look, and for that you have a couple of options: 1. You can make sure that the location of your include is in prman's shader path. Do this by editing the "/shaderpath" entry in your "rendermn.ini" file, or by adding it to the environment variable RMAN_SHADERPATH. 2. Since it's not unusual to have include files in several different places, it's probably more convenient to just tell the compiler where to find them, using the "-I" option, like this: shader -I/my/include/directory kewl.sl Include files are only necessary during compilation, not at runtime, so I use option #2 most of the time as it gives me the most flexibility. The examples above are obviously for a *nix system. I'm afraid I don't know what their equivalents are for windoze, sorry Quote Link to comment Share on other sites More sharing options...
Stremik Posted July 10, 2003 Author Share Posted July 10, 2003 Big thanks Mario!!! I realise that I could find all this info in PRMan's help files but for some reason I get confused and eventually lost every time I try to read it. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.