Constructors
BiColourMap
#public BiColourMap(ValueShader field, Color colour0, Color colour1, float threshold0 = 0, float threshold1 = 1)
Create a bicolour map for a value field.
Parameters:
| field (ValueShader) | Value shader. |
| colour0 (Color) | First colour. |
| colour1 (Color) | Second colour. |
| threshold0 (float = 0) | Threshold for colour0. |
| threshold1 (float = 1) | Threshold for colour1. |
Methods
ColourAt
#Evaluate this shader at a specific ray location.
Parameters:
| ray (Ray) | Coincident ray. |
| stack (IObjectStack) | Object stack context. |
Overrides: ColourShader.ColourAt
Dilate
Apply a dilation (or scaling) transformation to this shader.
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.
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.
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.
Translate
Apply a translation transformation to this shader.