Class PBRMaterial
public class PBRMaterial : IMaterial, IGraphicsResource, IIdentifier, ISerialization
- Inheritance
-
PBRMaterial
- Implements
- Inherited Members
Properties
Albedo
public Vector3 Albedo { get; set; }
Property Value
AlbedoTexture
public Texture AlbedoTexture { get; set; }
Property Value
ID
Gets or sets the unique identifier for the entity.
public Guid ID { get; }
Property Value
IsInitialized
Gets a value indicating whether the object has been initialized and is ready for use.
public bool IsInitialized { get; }
Property Value
IsTransparent
public bool IsTransparent { get; }
Property Value
Metallic
public float Metallic { get; set; }
Property Value
MetallicTexture
public Texture MetallicTexture { get; set; }
Property Value
Name
Gets or sets the name associated with the object.
public string Name { get; set; }
Property Value
NormalTexture
public Texture NormalTexture { get; set; }
Property Value
Occlusion
public float Occlusion { get; set; }
Property Value
OcclusionTexture
public Texture OcclusionTexture { get; set; }
Property Value
Roughness
public float Roughness { get; set; }
Property Value
RoughnessTexture
public Texture RoughnessTexture { get; set; }
Property Value
Methods
Deserialize(JObject, SerializationContext, Func<JObject, bool>)
Populates the current object with values from the specified JSON object using the provided serialization context.
public void Deserialize(JObject obj, SerializationContext serializationContext, Func<JObject, bool> callback = null)
Parameters
objJObjectserializationContextSerializationContextThe context that provides information and services for the deserialization process. Cannot be null.
callbackFunc<JObject, bool>
Exceptions
- NotImplementedException
The method is not implemented.
Disable(IRenderDevice)
Disables the Material after rendering operations are complete.
public void Disable(IRenderDevice renderDevice)
Parameters
renderDeviceIRenderDevice
Dispose(IRenderDevice)
Releases all resources used by the current instance and performs cleanup using the specified render device.
public void Dispose(IRenderDevice renderDevice)
Parameters
renderDeviceIRenderDevice
FreeCPUResources()
Releases any CPU resources that are currently allocated by the component.
public void FreeCPUResources()
Remarks
Call this method when the component no longer needs to perform CPU-intensive operations to allow the system to reclaim resources. After calling this method, the component may not be able to perform certain operations until resources are reallocated.
Init(IRenderDevice)
Initializes the current instance using the specified render device.
public void Init(IRenderDevice renderDevice)
Parameters
renderDeviceIRenderDevice
LoadFromFile(string)
public static PBRMaterial LoadFromFile(string file)
Parameters
filestring
Returns
LoadMaterial(Material, string)
Loads a material from the specified Assimp material definition and associated directory.
public void LoadMaterial(Material asmat, string directory)
Parameters
asmatMaterialThe Assimp material to convert to an internal material representation. Cannot be null.
directorystringThe directory path used to resolve any external resources referenced by the material. Cannot be null or empty.
Exceptions
- NotImplementedException
The method is not implemented.
Serialize(JsonWriter, SerializationContext, Action<JsonWriter>)
Serializes the current object to a JSON representation using the specified serialization context.
public void Serialize(JsonWriter writer, SerializationContext serializationContext, Action<JsonWriter> callback = null)
Parameters
writerJsonWriterserializationContextSerializationContextThe context that provides information and settings required for the serialization process.
callbackAction<JsonWriter>
Exceptions
- NotImplementedException
The method is not implemented.
Use(IRenderDevice)
Configures the current instance to use the specified render device for rendering operations.
public void Use(IRenderDevice renderDevice)
Parameters
renderDeviceIRenderDeviceThe render device to be used. Cannot be null.