Methods
ColourAt
#Evaluate this shader at a specific ray location.
Parameters:
| ray (Ray) | Coincident ray. |
| stack (IObjectStack) | Object stack context. |
Fade
#Add a transparency layer to this shader.
Parameters:
| transparency (ValueShader) | Transparency layer. |
| combine (bool) | If true, overlay transparency is combined with existing transparency. If false, overlay transparency overrules the existing transparency. |
Returns: Modified shader.
Fade
#Add a transparency layer to this shader.
Parameters:
| transparency (ValueShader) | Transparency layer. |
Returns: Modified shader.
ResolveColour
#Utility function for resolving a colour with the background.
Parameters:
| colour (Color) | Colour to resolve. |
| ray (Ray) | Ray associated with colour location. |
| stack (IObjectStack) | Object stack context. |
Returns: Resolved colour.
Rotate
#Apply a rotation transformation to this shader.
Parameters:
| angle (Angle) | Rotation angle (counter-clockwise). |
Returns: Rotated shader.
Transform
#Apply a custom transformation to this shader.
Parameters:
| transform (Transform2D) | Transformation. |
Returns: Transformed shader.
TryParse
#Try and parse a string description.
Parameters:
| description (string) | Textual description. |
| message (out string) | On failure, a description of the problem will be outputted here. |
| shader (out ColourShader) | On success, a shader will be outputted here. |
Returns: True on success, false on failure.
Convertors
| Operation | Result | Description | ||
|---|---|---|---|---|
| implicit | Color | ColourShader | Create a solid fill shader. | |
| implicit | string | ColourShader | Attempt to parse a shader description. | |