google / google/bigwheels

[glTF] Support occlusion texture

Open
#461 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
C++
Stars
107
Forks
42
PR merge metrics
No merged PRs in 30d

Description

`occlusionTexture` is loaded and passed to the StandardMaterial but is never referenced.

The purpose is outlined in [3.9.3](https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#additional-textures):

> it indicates areas that receive less indirect lighting from ambient sources. Direct lighting is not affected. The red channel of the texture encodes the occlusion value, where 0.0 means fully-occluded area (no indirect lighting) and 1.0 means not occluded area (full indirect lighting). Other texture channels (if present) do not affect occlusion.
>
> The texture binding for occlusion maps MAY optionally contain a scalar strength value that is used to reduce the occlusion effect. When present, it affects the occlusion value as 1.0 + strength * (occlusionTexture - 1.0).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.