Material
Sandbox.Engine
Derives from Resource

Summary

A material. Uses several Sandbox.Textures and a Sandbox.Shader with specific settings for more interesting visual effects.

Properties

Access to all of the attributes of this material.

string Name { get; }

Name (or path) of the material.

Methods

static Material Create( string materialName, string shader, )

Create a new empty material at runtime.

static Material FromShader( Shader shader, )

Get an empty material based on the specified shader. This will cache the material so that subsequent calls will return the same material.

static Material FromShader( string path, )

Get an empty material based on the specified shader. This will cache the material so that subsequent calls will return the same material.

static Material Load( string filename, )

Load a material from disk. Has internal cache.

Create a copy of this material

bool Set( string param, Vector4 value, )

Overrides/Sets an Vector4 within the material

bool Set( string param, Texture texture, )

Override/Sets texture parameter (Color, Normal, etc)

bool Set( string param, Color value, )

Overrides/Sets an color within the material as a color value within the material

bool Set( string param, Vector3 value, )

Overrides/Sets an Vector3 within the material

bool Set( string param, Vector2 value, )

Overrides/Sets an Vector2 within the material

bool Set( string param, float value, )

Overrides/Sets an float within the material

bool Set( string param, int value, )

Overrides/Sets an int within the material

bool Set( string param, bool value, )

Overrides/Sets an bool within the material

Nested Types

  • Static materials for UI rendering purposes.