Public Member Functions
|X3DProgrammableShaderObject (H3DNodeDatabase *_database)|
A concrete X3DProgrammableShaderObject node instance is used to program behaviour for a shader in a scene. The shader is able to receive and process events that are sent to it. Each event that can be received shall be declared in the shader node using the same field syntax as is used in a prototype definition:
inputOnly type name
The type can be any of the standard X3D fields. Name shall be an identifier that is unique for this shader node and is used to map the value to the shader program's uniform variable of the same name. If a shader program does not have a matching uniform variable, the field value is ignored.
outputOnly fields are not required to generate output events from a shader. Current hardware shader technology does not support this capability, though future versions may.
It is recommended that user-defined field or event names defined in shader nodes follow the naming conventions described in ISO/IEC 19775-2.