irtk.scene.DiffuseBRDF

class irtk.scene.DiffuseBRDF(d: torch.Tensor | ndarray | List | Tuple)

A class representing a diffuse BRDF.

__init__(d: torch.Tensor | ndarray | List | Tuple) None

Initializes a DiffuseBRDF object.

Parameters:

d (TensorLike) – The diffuse reflectance (float, shape (3, ) or (m, n, 3)).

classmethod from_file(filename: str, is_srgb: bool | None = None) DiffuseBRDF

Creates a DiffuseBRDF object from a file.

Parameters:
  • filename (str) – The filename of the texture.

  • is_srgb (Optional[bool]) – Whether the texture is in sRGB format.

Returns:

A DiffuseBRDF object.

Return type:

DiffuseBRDF