SpatialMaterial constructor
SpatialMaterial({})
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',
],
),
);