PhysicallyBasedMaterial constructor
PhysicallyBasedMaterial({
- TextureSource? baseColorTexture,
- TextureSource? metallicRoughnessTexture,
- TextureSource? normalTexture,
- TextureSource? emissiveTexture,
- TextureSource? occlusionTexture,
- 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({
TextureSource? baseColorTexture,
TextureSource? metallicRoughnessTexture,
TextureSource? normalTexture,
TextureSource? emissiveTexture,
TextureSource? occlusionTexture,
this.environment,
}) : _baseColorTexture = baseColorTexture,
_metallicRoughnessTexture = metallicRoughnessTexture,
_normalTexture = normalTexture,
_emissiveTexture = emissiveTexture,
_occlusionTexture = occlusionTexture {
setFragmentShaderName('StandardFragment', cubeName: 'StandardCubeFragment');
}