Material
public sealed class Material : AssetNamespace NodeWorld.Flux.
A material of the world. Changing it changes every renderer of the world that uses it (Renderer.SetFloat... changes one renderer).
Properties
shader
public ShaderAsset shader { get; set; }The shader of the material; set it to the shader of another material of the world (its values stay).
renderQueue
public int renderQueue { get; set; }Render queue of the material; -1: the shader's.
color
public Color color { get; set; }The main color of the material (its [MainColor] property, or _Color).
shaderKeywords
public string[] shaderKeywords { get; set; }The shader keywords enabled on the material.
Methods
HasProperty
public bool HasProperty(string name)The material's shader has a property of this name.
SetFloat
public void SetFloat(string name, float value)Sets a float property of the material, for every renderer that uses it.
SetColor
public void SetColor(string name, Color value)Sets a color property of the material, for every renderer that uses it.
SetVector
public void SetVector(string name, Vector4 value)Sets a vector property of the material, for every renderer that uses it.
SetTexture
public void SetTexture(string name, Texture texture)Sets a texture property of the material, for every renderer that uses it (null: no texture).
GetFloat
public float GetFloat(string name)A float property of the material.
GetColor
public Color GetColor(string name)A color property of the material.
GetVector
public Vector4 GetVector(string name)A vector property of the material.
