DEPRECATED. This shader is unsupported, but it may still get installed with Softimage to provide compatibility with older scenes that
use it. It is recommended that you replace unsupported shaders in your scenes with equivalent shaders from the current Softimage
shader library.
| Code | Images | CGFX_Parameters | Render Tree Usage | CgColor
Category: RealTime > Cg > CgFX
RealTime (RTShader)
Output: RealTime
OpenGL
The CgFX shader provides support for nVIDIA's CgFX file format, Microsoft's FX file format, and COLLADA's FX file format with
the Cg profile.
The shader supports external file referencing as well as inlined code compilation for rapid prototyping.
Shaders should be installed to the Application\hsls\ directory of a workgroup.
You can also visit http://developer.nvidia.com/page/cg_main.html for more information about Cg shaders in general.
CgFX
General
|
Enables .cgfx file referencing. Deselect the checkbox if you want to enter code directly in the text editor on the Code tab.
|
|
Specifies the path and file name of the .cgfx file. You can type in the file name or use a browser to locate the file. The CgFX shader accepts a relative path to the effects file. The path should be relative to the root of the current project.
This allows you to transfer your project to another path or machine without having to re-associate your referenced file to
the new scene location.
|
|
Refreshes the effect display by reading and recompiling the .cgfx file. This is useful if you modify the .cgfx code. The corresponding tweakable parameters property set is updated, keeping any parameter values that you tuned, provided they
are still valid. Invalid parameter values are replaced with the default values.
|
|
Opens an editor where you can modify and save the currently displayed .cgfx file. After you save your .cgfx file, click Reload
to apply the changes.
|
|
Specify the attribute to be passed to the vertex shader input register.
|
|
Opens the property editor for the associated attribute so that you can edit its parameters. For example, if you have set tangent
data to be passed to the input register, pressing Edit will open the TangentOp2 operator property editor.
|
|
Creates a new Vertex_Color property.
Creates a new Weight Map Cluster (WeightMapCls) property.
Defines the new texture projection to be created. You can choose from the following:
-
Projects the texture along the U and V.
-
Projects the texture on X and Y coordinates only.
-
Projects the texture on X and Z coordinates only.
-
Projects the texture on Y and Z coordinates only.
-
Projects the texture as though it is a cylinder wrapped around an object.
-
Surrounds the object with a spherical mapping across the whole surface with some distortion.
-
The texture is centered on the scene's origin.
-
Applies the texture onto the object by first assigning the object's polygons to faces of a cube, and then projecting the
texture onto each face by default. The layout of a cubic projection can be completely customized using the options in the
Texture Support property editor.
-
The texture is mapped relative to the camera's center. In this coordinate system, the camera is the center of the "world,"
with an up vector, looking toward the negative Z axis. The result resembles an image projected from a camera. The texture
will move with the camera and will be affected by any scaling, rotation, and translation.
-
Applies a texture to polygon objects by assigning each polygon's UV coordinates to its own distinct piece of the texture
so that no two polygons' coordinates overlap each other.
-
Opens the Create Texture Support property page from which you can explicitly define a texture projection.
|
Code
|
Disable this option if you do not have an external CgFX file that you want to reference and you want to inline CgFX code directly
in the shader.
|
|
Include path for the CgFX code.
|
|
Enter CgFX code in the editor. CgFX files can contain Cg, assembly, and fixed-function shaders, along with the render states and environment information
needed to render the effect.
The text editor supports text customization (font, color, size), syntax styling, folding (hiding blocks such as functions
and subroutines), auto-completion and highlighting for keywords. You can also implement this text editor widget in your own
plug-ins.
|
|
Compiles and executes the CgFX code.
|
Images
The CgFX shader automatically creates and connects realtime shader texture nodes for the corresponding textures specified
in the .cgfx file.
CGFX_Parameters
The tweakable parameters UI is dynamically created when the effect is compiled. The UI is a custom property named CGFX_Parameters.
CgFX files often contain tweakable parameters UI that allow you to do the following:
To modify the UI for the tweakable parameters, you have to edit the code in the .cgfx file.
When you reload the .cgfx file, the tweakable parameters property set is updated, keeping any parameter values that you tuned,
provided they are still valid. Invalid parameter values are replaced with the default values.
Render Tree Usage
The CgFX shader is connected to the RealTime input of the material node. Other realtime shaders, such as texture shaders,
can be connected to the CgFX shader's "previous" input.