shader - compile shading language source into run-time shaders
SYNOPSIS
shader
[ -Iincdir ] [ -o outputfile ] [ -old ] [ -s
srcfilename ] [ -v ] [ -q ] [ -Uname
] [ -Dname ] [ -Dname=def
] [-nolint] [-lint] [-lintpoint] [-lintspace] [--lintpoint] [--lintspace]
[-strict] [-autoplug] 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
The following options are supported by shader.
- -Iincdir
-
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.
- -U name
-
This option is passed to and interpreted by cpp. It removes
any initial definition of
name, where
name
is a reserved symbol that is predefined by the particular version of
cpp(1). See
cpp(1) for the implementation-dependent list of these possibly reserved
symbols.
- -D name
-
This option is passed to and interpreted by cpp. It defines
name
as 1 (one). This is the same as if a
-Dname=1
option appeared on the
shader
command line, or as if a
#define name 1 line appeared in the source file that
shader
is processing.
- -D name=def
-
This option is passed to and interpreted by cpp. It defines
name
as if by a
#define
directive. This is the same as if a
#define name def line appeared in the source file
that
shader
is processing. The
-D
option has lower precedence than the
-U
option. That is, if the same name is used in both a
-U
option and a
-D
option, the name will be undefined regardless of the order of the options.
- -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.
- -lintpoint
-
Turns on "shader lint" specifically for warnings about point data type
usage. This can override -nolint 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.
- --lintpoint
-
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 off "shader lint" specifically for warnings about usage of
coordinate spaces. This can override -lint for this specific
type of lint warning.
- -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 is considered deprecated behavior; it should
only be used during transition to new-style RSL Plugins.
- -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.
- -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).
- -v
-
The verbose option produces more output from the compiler.
- -q
-
The quiet option suppresses the normal printing of the shader module
names as they are compiled.
- -Ffuncdir
- This option specifies the directory in which to search for
precompiled shader functions. Note that the new compiler does not
separately compile functions, and thus does not need nor recognize
this option.
FILES
/lib/cpp pre-processor
/usr/local/prman/prman/lib/shaders default include directory
/usr/local/prman/bin/shader compiler executable
SEE ALSO
cpp(1)
Pixar Animation Studios
(510) 752-3000 (voice)
(510) 752-3151 (fax)
Copyright © 1996-
Pixar. All rights reserved.
RenderMan® is a registered trademark of Pixar. |