PhysicallyBasedMaterial constructor

PhysicallyBasedMaterial({
  1. TextureSource? baseColorTexture,
  2. TextureSource? metallicRoughnessTexture,
  3. TextureSource? normalTexture,
  4. TextureSource? emissiveTexture,
  5. TextureSource? occlusionTexture,
  6. EnvironmentMap? environment,
})

Creates a PBR material with the given textures.

All textures are optional; missing textures are replaced with neutral placeholders at draw time. Per-channel scaling factors (e.g. metallicFactor, roughnessFactor) default to neutral and can be tweaked after construction.

Implementation

PhysicallyBasedMaterial({
  this.baseColorTexture,
  this.metallicRoughnessTexture,
  this.normalTexture,
  this.emissiveTexture,
  this.occlusionTexture,
  this.environment,
}) {
  setFragmentShaderName('StandardFragment');
}