#396 The '@' expansion doesn't work on MacOSX

Chris Foster

$ aqsis --version
: aqsis version 1.6.0 (revision 0)
: compiled Oct 11 2009 13:19:03

As discussed on IRC 02/12/09


  • Paul Gregory
    Paul Gregory

    This is due to the way that MacOSX handles the shader paths in it's aqsisrc. It seems that the "defaultshaderpath" is setup using the %AQSISHOME% environment variable, and in aqsisrc.in.cmake, the shaderpath is set to [".:@:${SHADERPATH}"] and ${SHADERPATH} is only set in a MacOSX build, and is set to the same string as the ${DEFAULT_SHADERPATH}.

    I'm guessing the reason for the ${SHADERPATH} is that the default behaviour of using '@' expansion wasn't working. The reason it isn't working is that the environment variable expansion isn't applied to "defaultsearchpath" options, only to "searchpath" options. This means that the initial searchpath on MacOSX has two copies, one with %AQSISHOME% unexpanded, and one with. And moreso, if anyone uses '@' expansion, it fails, as the unexpanded string is used as the default.

    The correct solution is to make environment expansion work for both "searchpath" and "defaultsearchpath" options, and get rid of the extraneous ${SHADERPATH} stuff, i.e. make the '@' expansion work properly.

  • Brent Fulgham
    Brent Fulgham

    One thing I noticed was that the aqsisrc file is generated with a leading colon (i.e., [":/usr/local/share/..., rather than ["/usr/local/.."). After changing this, aqsis seemed to be better able to find the shaders in the path, although it did not automatically build the ".sl" files into ".slx". After doing this manually, aqsis was able to run the scene.

  • Chris Foster
    Chris Foster

    This should be fixed now as of git revision baef26b2b97a170d197e7573671d27461d4ceb16.

    The problem was basically as Paul has described regarding string expansion with "defaultpath". (I couldn't see too much odd about the way that SHADERPATH was set up & it seems to me that it's used on all platforms, not just OSX so I left that alone for now.)

    bflugham has confirmed the fix on IRC (thanks!)



Cancel   Add attachments