refreshMaterialUniforms method

dynamic refreshMaterialUniforms(
  1. dynamic uniforms,
  2. Material material,
  3. dynamic pixelRatio,
  4. dynamic height,
  5. dynamic transmissionRenderTarget,
)

Implementation

refreshMaterialUniforms(uniforms, Material material, pixelRatio, height, transmissionRenderTarget) {
  if (material is MeshBasicMaterial) {
    refreshUniformsCommon(uniforms, material);
  } else if (material is MeshLambertMaterial) {
    refreshUniformsCommon(uniforms, material);
  } else if (material is MeshToonMaterial) {
    refreshUniformsCommon(uniforms, material);
    refreshUniformsToon(uniforms, material);
  } else if (material is MeshPhongMaterial) {
    refreshUniformsCommon(uniforms, material);
    refreshUniformsPhong(uniforms, material);
  } else if (material is MeshStandardMaterial) {
    refreshUniformsCommon(uniforms, material);
    refreshUniformsStandard(uniforms, material);
    if (material is MeshPhysicalMaterial) {
      refreshUniformsPhysical(uniforms, material, transmissionRenderTarget);
    }
  } else if (material is MeshMatcapMaterial) {
    refreshUniformsCommon(uniforms, material);
    refreshUniformsMatcap(uniforms, material);
  } else if (material is MeshDepthMaterial) {
    refreshUniformsCommon(uniforms, material);
  } else if (material is MeshDistanceMaterial) {
    refreshUniformsCommon(uniforms, material);
    refreshUniformsDistance(uniforms, material);
  } else if (material is MeshNormalMaterial) {
    refreshUniformsCommon(uniforms, material);
  } else if (material is LineBasicMaterial) {
    refreshUniformsLine(uniforms, material);

    if (material is LineDashedMaterial) {
      refreshUniformsDash(uniforms, material);
    }
  } else if (material is PointsMaterial) {
    refreshUniformsPoints(uniforms, material, pixelRatio, height);
  } else if (material is SpriteMaterial) {
    refreshUniformsSprites(uniforms, material);
  } else if (material is ShadowMaterial) {
    uniforms["color"]["value"].copy(material.color);
    uniforms["opacity"]["value"] = material.opacity;
  } else if (material is ShaderMaterial) {
    material.uniformsNeedUpdate = false; // #15581

  }
}