Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add anisotropy property to renderer and material for configuring it globally and per material respectively #5309

Merged
merged 1 commit into from
Jun 20, 2023

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

package.json Outdated Show resolved Hide resolved
@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