Class PolySpatialShaderGlobals
Inheritance
PolySpatialShaderGlobals
Syntax
public static class PolySpatialShaderGlobals
Fields
CosTime
Declaration
public const string CosTime = "_CosTime"
Field Value
CosTimeID
Declaration
public static readonly int CosTimeID
Field Value
DeltaTime
Declaration
public const string DeltaTime = "unity_DeltaTime"
Field Value
DeltaTimeID
Declaration
public static readonly int DeltaTimeID
Field Value
OrthoParams
Declaration
public const string OrthoParams = "unity_OrthoParams"
Field Value
OrthoParamsID
Declaration
public static readonly int OrthoParamsID
Field Value
ProjectionMatrix
Declaration
public const string ProjectionMatrix = "UNITY_MATRIX_P"
Field Value
ProjectionMatrixID
Declaration
public static readonly int ProjectionMatrixID
Field Value
ProjectionParams
Declaration
public const string ProjectionParams = "_ProjectionParams"
Field Value
ProjectionParamsID
Declaration
public static readonly int ProjectionParamsID
Field Value
ScreenParams
Declaration
public const string ScreenParams = "_ScreenParams"
Field Value
ScreenParamsID
Declaration
public static readonly int ScreenParamsID
Field Value
SinTime
Declaration
public const string SinTime = "_SinTime"
Field Value
SinTimeID
Declaration
public static readonly int SinTimeID
Field Value
Time
Declaration
public const string Time = "_Time"
Field Value
TimeID
Declaration
public static readonly int TimeID
Field Value
ViewMatrix
Declaration
public const string ViewMatrix = "UNITY_MATRIX_V"
Field Value
ViewMatrixID
Declaration
public static readonly int ViewMatrixID
Field Value
WorldSpaceCameraDir
Declaration
public const string WorldSpaceCameraDir = "_WorldSpaceCameraDir"
Field Value
WorldSpaceCameraDirID
Declaration
public static readonly int WorldSpaceCameraDirID
Field Value
WorldSpaceCameraPos
Declaration
public const string WorldSpaceCameraPos = "_WorldSpaceCameraPos"
Field Value
WorldSpaceCameraPosID
Declaration
public static readonly int WorldSpaceCameraPosID
Field Value
WorldSpaceLightPos0
Declaration
public const string WorldSpaceLightPos0 = "_WorldSpaceLightPos0"
Field Value
WorldSpaceLightPos0ID
Declaration
public static readonly int WorldSpaceLightPos0ID
Field Value
Methods
SetColor(String, Color)
Sets the value of a color shader global and adds it to the list of globals to transfer via PolySpatial.
Declaration
public static void SetColor(string name, Color value)
Parameters
Type |
Name |
Description |
String |
name |
The name of the shader global to set.
|
Color |
value |
The new value for the shader global.
|
SetFloat(String, Single)
Sets the value of a float shader global and adds it to the list of globals to transfer via PolySpatial.
Declaration
public static void SetFloat(string name, float value)
Parameters
Type |
Name |
Description |
String |
name |
The name of the shader global to set.
|
Single |
value |
The new value for the shader global.
|
SetInteger(String, Int32)
Sets the value of an integer shader global and adds it to the list of globals to transfer via PolySpatial.
Declaration
public static void SetInteger(string name, int value)
Parameters
Type |
Name |
Description |
String |
name |
The name of the shader global to set.
|
Int32 |
value |
The new value for the shader global.
|
SetMatrix(String, Matrix4x4)
Sets the value of a matrix shader global and adds it to the list of globals to transfer via PolySpatial.
Declaration
public static void SetMatrix(string name, Matrix4x4 value)
Parameters
Type |
Name |
Description |
String |
name |
The name of the shader global to set.
|
Matrix4x4 |
value |
The new value for the shader global.
|
SetTexture(String, Texture)
Sets the value of a texture shader global and adds it to the list of globals to transfer via PolySpatial.
Declaration
public static void SetTexture(string name, Texture value)
Parameters
Type |
Name |
Description |
String |
name |
The name of the shader global to set.
|
Texture |
value |
The new value for the shader global.
|
SetVector(String, Vector4)
Sets the value of a vector shader global and adds it to the list of globals to transfer via PolySpatial.
Declaration
public static void SetVector(string name, Vector4 value)
Parameters
Type |
Name |
Description |
String |
name |
The name of the shader global to set.
|
Vector4 |
value |
The new value for the shader global.
|
TryAdd(String, PolySpatialShaderGlobals.PropertyType)
Attempts to add a property to the list of shader globals to transfer via PolySpatial.
Declaration
public static bool TryAdd(string name, PolySpatialShaderGlobals.PropertyType type)
Parameters
Returns
Type |
Description |
Boolean |
True if added or already present with the same type, false if already present
with a different type (in which case an error will be logged).
|
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.