refreshUniformsStandard method

dynamic refreshUniformsStandard(
  1. dynamic uniforms,
  2. dynamic material
)

Implementation

refreshUniformsStandard(uniforms, 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;
  }

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

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