Skip to content

Conversation

@mrxz
Copy link
Contributor

@mrxz mrxz commented Jun 16, 2023

Description:
When viewing textures under a steep angle it can quickly become "blurry" and "greyish". In those cases anisotropic filtering can make a huge difference in visual quality. See for example the effect it has on the aframe-environment-component: supermedium/aframe-environment-component#95

Meta sets this on all textures for loaded models in their Project Flowerbed and in a blog post they summarize it as:

On your environment textures: Turn on anisotropic filtering

Three.js provides two ways to configure this, one setting a global default and the other on a per-texture basis. This PR exposes both of them; on the renderer system and material component respectively. For the material it will apply to all texture maps for that material, but in practice you'd want them in sync anyway. The code doesn't have to worry about unsupported values or invalid combinations as Three.js handles that already :-)

Changes proposed:

  • Add an anisotropy property on the renderer system for setting THREE.Texture.DEFAULT_ANISOTROPY
  • Add an anisotropy property on the material component

@dmarcos
Copy link
Member

dmarcos commented Jun 20, 2023

Thank you so much!

@dmarcos dmarcos merged commit 93b500e into aframevr:master Jun 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants