Included compiled shaders

Help
2009-03-26
2013-04-25
  • Chris Hodapp
    Chris Hodapp
    2009-03-26

    I just compiled Pixie v2.2.5 from source and came upon errors like this anytime I'd try to run simple examples:

    ./polygon.rib (6): Error in shader "/usr/local/shaders/ambientlight.sdr" (0) ("syntax error") (v2.2.5)
    ./polygon.rib (6): Failed to find shader "ambientlight"

    I eventually went into /usr/local/shaders, deleted all .sdr files, and recompiled with sdrc. The errors promptly went away.
    Upon further examination, it looks like all the compiled shaders included in the source tree have CR/LF for line endings, while there is only CR if I run them through 'sdrc' myself.

     
    • Natacha
      Natacha
      2009-03-27

      I ran into the same issue, but I did not take the time to investigate it. I thought "make install" was compiling the .sdr files from .sl with the newly compiled sdrc; it seems I was wrong.

      However the working .sdr files here have LF-only endings, which is the usual UNIX convention. What platform are you using?

       
    • Chris Hodapp
      Chris Hodapp
      2009-03-27

      Hm, another idiot moment on my part...
      I guess I mixed up old Mac line endings with Unix line endings.
      I meant that they had LF, not CR; in either case, it was not CR/LF. I'm on AMD64 using Ubuntu 8.10.

       
    • The sdr reader fails on DOS line endings on Unix. I've made a small patch to fix it:
      https://sourceforge.net/tracker/?func=detail&aid=2727776&group_id=59462&atid=491094

      For now Unix users will have to manually recompile the shaders using e.g. "sdrc *sl" in the shader directory.