Skip to content

Blue channel of anisotropyTexture causing odd behavior #26694

@echadwick-artist

Description

@echadwick-artist

Description

When the blue channel of an anisotropyTexture is set to zero, three.js seems to exhibit odd rendering behavior.
2023-09-04 18_55_47-NVIDIA GeForce Overlay DT

Maybe related to #25701 ?

anisotropyTexture looks like this. Both spheres are assigned a vertical direction (.5,1), left sphere has full aniso (blue 1.0), right sphere has zero (blue 0))
anisotropyTexture

Other renderers:
2023-09-04 18_53_04-NVIDIA GeForce Overlay DT

2023-09-04 18_53_58-NVIDIA GeForce Overlay DT

This issue can also be seen in the glTF Sample Asset AnisotropyBarnLamp. Notice the shading differences on the flat knob at the top, knurled ring grip at middle, and 3 shade screws at the bottom. Viewers both use the IBL Wide Street 01 from Poly Haven.
2023-09-04 22_31_50-NVIDIA GeForce Overlay DT

anisotropyBarnLamp's anisotropyStrength (blue channel):
2023-09-04 22_33_02-NVIDIA GeForce Overlay DT

Reproduction steps

  1. Go to https://threejs.org/editor/
  2. Drag-n-drop attached glTF.
  3. Set the Environment to MODELVIEWER.

Code

glTF material:

    {
      "name": "Copper",
      "pbrMetallicRoughness": {
        "baseColorFactor": [
          0.8,
          0.25,
          0.1,
          1.0
        ],
        "metallicFactor": 1,
        "roughnessFactor": 0.2
      },
      "normalTexture": {
        "index": 0
      },
      "extensions": {
        "KHR_materials_anisotropy": {
          "anisotropyStrength": 1.0,
          "anisotropyTexture": {
            "index": 1
          }
        }
      }
    }

Live example

Sample model using KHR_materials_anisotropy. Both spheres are in a single mesh, using same material, and the normalTexture is flat 128,128,255.
anisotropyTexture-v-Metalness.zip

Screenshots

No response

Version

r156

Device

Desktop

Browser

Chrome, Firefox

OS

Windows

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions