refreshMaterialUniforms method
dynamic
refreshMaterialUniforms(
- dynamic uniforms,
- Material material,
- dynamic pixelRatio,
- dynamic height,
- 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
}
}