Skip to content

Materials: Consider to use mediump for all shaders #14570

@Mugen87

Description

@Mugen87
Description of the problem

Right now, the default precision for shader progams in three.js is highp. Issues like #14137 showed that this approach causes rendering problems especially on (older) mobile devices . Using mediump would solve these issues and also improve the performance of the shader execution on mobile, see #14137 (comment).

The problem is that certain materials like MeshStandardMaterial can not produce correct visual output with mediump right now, see #14137 (comment). Changing certain parts of the shader souce code is necessary to solve this issue.

Three.js version
  • Dev
  • r94
  • ...
Browser
  • All of them
  • Chrome
  • Firefox
  • Internet Explorer
OS
  • All of them
  • Windows
  • macOS
  • Linux
  • Android
  • iOS
Hardware Requirements (graphics card, VR Device, ...)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions