Class Material
Immutable opaque material using packed 0xAARRGGBB color.
Inherited Members
Namespace: Simple3D.Core
Assembly: Simple3D.Core.dll
Syntax
public sealed class Material
Constructors
| Edit this page View SourceMaterial(Texture2D, uint, bool, bool)
Creates a textured material; white tint preserves texture colors. The shape must have UV coordinates.
Declaration
public Material(Texture2D texture, uint color = 4294967295, bool lit = true, bool doubleSided = true)
Parameters
| Type | Name | Description |
|---|---|---|
| Texture2D | texture | |
| uint | color | |
| bool | lit | |
| bool | doubleSided |
Material(uint, bool, bool)
Creates an opaque material. Transparent colors are rejected.
Declaration
public Material(uint color = 4286356991, bool lit = true, bool doubleSided = true)
Parameters
| Type | Name | Description |
|---|---|---|
| uint | color | |
| bool | lit | |
| bool | doubleSided |
Properties
| Edit this page View SourceColor
Opaque packed 0xAARRGGBB color.
Declaration
public uint Color { get; }
Property Value
| Type | Description |
|---|---|
| uint |
DoubleSided
Whether back faces are rendered.
Declaration
public bool DoubleSided { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Lit
Whether scene lighting affects the color.
Declaration
public bool Lit { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Texture
Optional immutable texture, multiplied by the color.
Declaration
public Texture2D? Texture { get; }
Property Value
| Type | Description |
|---|---|
| Texture2D |