SpatialMaterial constructor

SpatialMaterial({
  1. Color albedoColor = const Color(0xFFFFFFFF),
  2. Texture? albedoTexture,
  3. double metallic = 0.8,
  4. double roughness = 0.6,
})

Implementation

SpatialMaterial({
  this.albedoColor = const Color(0xFFFFFFFF),
  Texture? albedoTexture,
  this.metallic = 0.8,
  this.roughness = 0.6,
}) : albedoTexture = albedoTexture ?? Texture.standard,
     super(
       vertexShader: VertexShader.fromAsset(
         'packages/flame_3d/assets/shaders/spatial_material.shaderbundle',
         slots: ['VertexInfo', 'JointMatrices'],
       ),
       fragmentShader: FragmentShader.fromAsset(
         'packages/flame_3d/assets/shaders/spatial_material.shaderbundle',
         slots: [
           'albedoTexture',
           'Material',
           'AmbientLight',
           'Lights',
           'Camera',
         ],
       ),
     );