This class communicates directly with the shader to draw the graphs. Performance here is very important to reduce as much overhead as possible, as we are updating hundreds of values every frame.
More...
|
void | InitializeShader () |
| This is done to avoid a design problem that arrays in shaders have, and should be called before initializing any shader graph. The first time that you use initialize an array, the size of the array in the shader is fixed. This is why sometimes you will get a warning saying that the array size will be capped. It shouldn't generate any issues, but in the worst case scenario just reset the Unity Editor (if for some reason the shaders reload). I also cache the Property IDs, that make access faster to modify shader parameters.
|
|
void | UpdateArray () |
| Updates the material linked with this shader graph with the values in the float[] array.
|
|
void | UpdateAverage () |
| Updates the average parameter in the material.
|
|
void | UpdateThresholds () |
| Updates the thresholds in the material.
|
|
void | UpdateColors () |
| Updates the colors in the material.
|
|
void | UpdatePoints () |
| Updates the points in the graph with the set array of values.
|
|
|
int | ArrayMaxSize = 128 |
|
float[] | ShaderArrayValues |
|
Image | Image = null |
|
float | Average = 0 |
|
float | GoodThreshold = 0 |
|
float | CautionThreshold = 0 |
|
Color | GoodColor = Color.white |
|
Color | CautionColor = Color.white |
|
Color | CriticalColor = Color.white |
|
|
const int | ArrayMaxSizeFull = 512 |
|
const int | ArrayMaxSizeLight = 128 |
|
This class communicates directly with the shader to draw the graphs. Performance here is very important to reduce as much overhead as possible, as we are updating hundreds of values every frame.
The documentation for this class was generated from the following file:
- C:/Transhuman/S2/Assets/Plugins/Graphy - Ultimate Stats Monitor/Runtime/Shader/G_GraphShader.cs