Skip to content

Image text color fades in different versions #31311

@jameszhong2008

Description

@jameszhong2008

Description

I have an image with black text. In version 132, the text is obviously darker. In version 168, the text is blurred. The settings of WebGLRenderer, Texture and Material are the same.

Is there anything I should pay attention to?

Reproduction steps

  1. Create a PlaneGeometry
  2. Load a image with black text
  3. text color in Version 168 is blurred, also use the latest version 0.177. same result.

Code

// code goes here
const renderer = new THREE.WebGLRenderer({
        antialias: true, // 启用抗锯齿
      });
// 2. 创建图片纹理(重点优化清晰度)
      const textureLoader = new THREE.TextureLoader();
      textureLoader.load(
        "https://orgshow.aiyunhuizhan.com/public/uploads/142/20250625/1f2bb9e8b9be1c9ce599f285dd5c27f3.png",
        (texture) => {
          // 关键优化设置
                    texture.colorSpace = THREE.SRGBColorSpace; // 正确颜色空间

          // 3. 创建平面几何体并应用纹理
          const geometry = new THREE.PlaneGeometry(
            1,
            1 * (texture.image.height / texture.image.width)
          );
          const material = new THREE.MeshBasicMaterial({
            map: texture,            
          });

          const plane = new THREE.Mesh(geometry, material);
          scene.add(plane);
}

the only different is i use different version.

<script src="https://cdn.jsdelivr.net/npm/[email protected]/build/three.min.js"></script>
<script type="module">
      import * as THREE from "https://cdn.jsdelivr.net/npm/[email protected]/+esm";
      ...
</script>

Live example

https://jsfiddle.net/8ah3brs5/6/

Screenshots

More Clear with version 132
Image

Text blurred with Version 168, also use the latest version 0.177. same result.
Image

Version

168

Device

Desktop

Browser

Chrome

OS

Windows

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions