refreshUniformsStandard method

void refreshUniformsStandard(
  1. Map<String, dynamic> uniforms,
  2. Material material
)

Implementation

void refreshUniformsStandard(Map<String, dynamic> uniforms, Material material) {
  uniforms["roughness"]["value"] = material.roughness;
  uniforms["metalness"]["value"] = material.metalness;

  if (material.roughnessMap != null) {
    uniforms["roughnessMap"]["value"] = material.roughnessMap;
  }

  if (material.metalnessMap != null) {
    uniforms["metalnessMap"]["value"] = material.metalnessMap;
  }

  final envMap = properties.get(material)["envMap"];

  if (envMap != null) {
    //uniforms.envMap.value = material.envMap; // part of uniforms common
    uniforms["envMapIntensity"]["value"] = material.envMapIntensity;
  }
}