What's New in Director 8.5 > The 3D Cast Member > Shaders |  |

Shaders

A shader defines the basic appearance of a model's surface. You apply textures to shaders. The standard shader is photorealistic; here are some of the other available shaders:

| `#painter`, which looks like a painted surface
| `#engraver`, which looks like an engraved surface
| `#newsprint`, which looks like a newspaper photograph

The following commands and properties can be used to perform basic shader operations:

Command | Function | Returns
--- | --- | ---
`shader.count` | Returns the number of shader objects included in the cast member. | Integer.
`shader(``name``)` | Returns the shader named `name`. | Returns the shader object named `name` if it exists. Returns `void` if the object does not exist.
`shader[``index``]` | Returns the shader at the designated position in the index. The index number can change if shaders are added or deleted. | Returns the shader object at that index number if it exists. Returns `void` if the object does not exist at that index number.
`newShader(``name,type``)` | Creates a new shader and adds it to the shader object list. The `type` can be `#standard`, `#painter`, `#engraver`, or `#newsprint`. | Returns a new shader object with a unique name. If the name isn't unique, returns a Lingo error.
`deleteShader(``name``)` | Deletes the shader named `name`. Lingo references to this shader persist but can do nothing. | `TRUE (1)` if the shader named name exists. `FALSE (0)` if the shader named name doesn't exist.
`deleteShader(``index``)` | Deletes the shader with the given index number. Lingo references to this shader persist but can do nothing. | `TRUE (1)` if the shader with this index number exists. `FALSE (0)` if the shader with this index number doesn't exist.