shader - compile shading language source into run-time shaders

shader - compile shading language source into run-time shaders

SYNOPSIS

shader [ options ] files ...

DESCRIPTION

shader translates shading language source statements into modules suitable for execution in the RenderMan run-time environment. If the files specification is missing, shader looks for input on stdin. Unless overridden with the -q option, the compiler prints the name of each shader module as it is compiled.

OPTIONS

-s srcfilename

This allows specification of the original source file name in those cases where it may be difficult or impossible to infer it otherwise (e.g., when the source file is being cated to stdin).

-o outputfile

By default, shader places its output in a file named shader_name.slo, where shader_name is the name of the shader as specified in the shader definition statement in the source file. Note that this is not necessarily the same as the source file name. The -o option allows the user to override this default naming convention. It should be used with care since the run-time system looks for shader executables according to the default naming convention. The outputfile specification may be either a file name, in which case output is written to the specified file, or one of the following special names:

  • -

    Write the output to stdout

  • -src

    Derive an output filename from the source filename by removing any directory prefix and a .sl suffix and appending a .slo suffix.

  • -shader

    Derive the output filename from the name of the shader and the .slo suffix. This is the default.

-f

Tells the compiler to act as a filter (i.e. write the output to stdout).

-I incdir

This option is actually passed to and interpreted by cpp, the C pre-processor. It specifies the directory in which to search for #include files. Several such options may be given to shader and directories are searched in the order specified. The default directory, /usr/local/prman/prman/lib/shaders will be searched last.

-nostdinc

Do not include the stdrsl searchpath.

-D sym[=val]

Defines the preprocessor symbol sym as val.

-lint

Turns on "shader lint." This option, on by default, causes the compiler to generate strict warnings about improper use of point types, noise, mixing of spaces, and other possible shader programming errors.

-nolint

Turns off "shader lint" entirely.

-lintlt

Turns on lint for lighting tool issues.

-nolintlt

Turns off lint for lighting tool issues.

-lintdso

Turns on DSO "version mismatch" warning mode.

-nolintdso

Turns off DSO "version mismatch" warning mode.

-lintpoint

Turns on "shader lint" specifically for warnings about point data type usage. This can override -nolint for this specific type of lint warning.

-nolintpoint

Turns off "shader lint" specifically for warnings about point data type usage. This can override -lint for this specific type of lint warning.

-lintspace

Turns on "shader lint" specifically for warnings about usage of coordinate spaces. This can override -nolint for this specific type of lint warning.

-nolintspace

Turns off "shader lint" specifically for warnings about usage of coordinate spaces. This can override -lint for this specific type of lint warning.

-nolintuov

Turns off uninitialized variable warnings.

-strict

When used, this flag enforces strict type conformance on user function arguments. By default arguments only have to be compatible (point == vector == normal).

-autoplug

When used, this flag activates the old-style RSL Plugin search behavior, which does not require the use of the RSL plugin directive to specify the filename where the plugins are located. This flag has been deprecated; it should only be used during transition to new-style RSL Plugins.

-utime

Tells shader to use uniform time and dtime.

-back

Generates backwards-compatible code.

-sd

Use "smooth derivatives" (default).

-nosd

Do not use "smooth derivatives."

-help

Prints usage information for the shader utility.

-q

The quiet option suppresses the normal printing of the shader module names as they are compiled.

-v

The verbose option produces more output from the compiler.

-version

Prints the shader executable version information.

FILES


/lib/cpp - pre-processor
/usr/local/prman/prman/lib/shaders - default include directory
/usr/local/prman/bin/shader - compiler executable