Class MixedRealityShaderGUI
A custom base shader inspector for Mixed Reality Toolkit shaders.
Inheritance
MixedRealityShaderGUI
Assembly: cs.temp.dll.dll
public abstract class MixedRealityShaderGUI : ShaderGUI
Fields
Declaration
protected MaterialProperty blendOperation
Field Value
| Type |
Description |
| MaterialProperty |
|
Declaration
protected MaterialProperty colorWriteMask
Field Value
| Type |
Description |
| MaterialProperty |
|
Declaration
protected MaterialProperty cullMode
Field Value
| Type |
Description |
| MaterialProperty |
|
Declaration
protected MaterialProperty customRenderingMode
Field Value
| Type |
Description |
| MaterialProperty |
|
Declaration
protected MaterialProperty depthOffsetFactor
Field Value
| Type |
Description |
| MaterialProperty |
|
Declaration
protected MaterialProperty depthOffsetUnits
Field Value
| Type |
Description |
| MaterialProperty |
|
Declaration
protected MaterialProperty depthTest
Field Value
| Type |
Description |
| MaterialProperty |
|
Declaration
protected MaterialProperty depthWrite
Field Value
| Type |
Description |
| MaterialProperty |
|
Declaration
protected MaterialProperty destinationBlend
Field Value
| Type |
Description |
| MaterialProperty |
|
Declaration
protected bool initialized
Field Value
Declaration
protected const string LegacyShadersPath = "Legacy Shaders/"
Field Value
Declaration
protected MaterialProperty renderingMode
Field Value
| Type |
Description |
| MaterialProperty |
|
Declaration
protected MaterialProperty renderQueueOverride
Field Value
| Type |
Description |
| MaterialProperty |
|
Declaration
protected MaterialProperty sourceBlend
Field Value
| Type |
Description |
| MaterialProperty |
|
Declaration
protected const string TransparentCutoutShadersPath = "/Transparent/Cutout/"
Field Value
Declaration
protected const string TransparentShadersPath = "/Transparent/"
Field Value
Methods
Declaration
protected virtual void FindProperties(MaterialProperty[] props)
Parameters
| Type |
Name |
Description |
| MaterialProperty[] |
props |
|
Get the value of a given color property for a material
Declaration
protected static Color? GetColorProperty(Material material, string propertyName)
Parameters
| Type |
Name |
Description |
| Material |
material |
material to check
|
| String |
propertyName |
name of property against material
|
Returns
| Type |
Description |
| Nullable<Color> |
if has property, then value of that property for current material, null otherwise
|
Get the value of a given float property for a material
Declaration
protected static float? GetFloatProperty(Material material, string propertyName)
Parameters
| Type |
Name |
Description |
| Material |
material |
material to check
|
| String |
propertyName |
name of property against material
|
Returns
| Type |
Description |
| Nullable<Single> |
if has property, then value of that property for current material, null otherwise
|
Get the value of a given vector property for a material
Declaration
protected static Vector4? GetVectorProperty(Material material, string propertyName)
Parameters
| Type |
Name |
Description |
| Material |
material |
material to check
|
| String |
propertyName |
name of property against material
|
Returns
| Type |
Description |
| Nullable<Vector4> |
if has property, then value of that property for current material, null otherwise
|
Declaration
protected void Initialize(Material material)
Parameters
| Type |
Name |
Description |
| Material |
material |
|
Declaration
protected virtual void MaterialChanged(Material material)
Parameters
| Type |
Name |
Description |
| Material |
material |
|
Declaration
public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] props)
Parameters
| Type |
Name |
Description |
| MaterialEditor |
materialEditor |
|
| MaterialProperty[] |
props |
|
Check whether shader feature is enabled
Declaration
protected static bool PropertyEnabled(MaterialProperty property)
Parameters
| Type |
Name |
Description |
| MaterialProperty |
property |
float property to check against
|
Returns
| Type |
Description |
| Boolean |
false if 0.0f, true otherwise
|
Declaration
protected void RenderingModeOptions(MaterialEditor materialEditor)
Parameters
| Type |
Name |
Description |
| MaterialEditor |
materialEditor |
|
Set color property against associated material
Declaration
protected static void SetColorProperty(Material material, string propertyName, Color? propertyValue)
Parameters
| Type |
Name |
Description |
| Material |
material |
material to control
|
| String |
propertyName |
name of property to set
|
| Nullable<Color> |
propertyValue |
value of property to set
|
Sets the shader feature controlled by keyword and property name parameters active or inactive
Declaration
protected static void SetShaderFeatureActive(Material material, string keywordName, string propertyName, float? propertyValue)
Parameters
| Type |
Name |
Description |
| Material |
material |
Material to modify
|
| String |
keywordName |
Keyword of shader feature
|
| String |
propertyName |
Associated property name for shader feature
|
| Nullable<Single> |
propertyValue |
float to be treated as a boolean flag for setting shader feature active or inactive
|
Declaration
protected static void SetupMaterialWithRenderingMode(Material material, MixedRealityShaderGUI.RenderingMode mode, MixedRealityShaderGUI.CustomRenderingMode customMode, int renderQueueOverride)
Parameters
Sets vector property against associated material
Declaration
protected static void SetVectorProperty(Material material, string propertyName, Vector4? propertyValue)
Parameters
| Type |
Name |
Description |
| Material |
material |
material to control
|
| String |
propertyName |
name of property to set
|
| Nullable<Vector4> |
propertyValue |
value of property to set
|