google / google/bigwheels

[glTF] Support emissive texture

Open
#462 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

`emissiveTexture` 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):

> The emissive texture and factor control the color and intensity of the light being emitted by the material. The texture MUST contain 8-bit values encoded with the sRGB opto-electronic transfer function so RGB values MUST be decoded to real linear values before they are used for any computations. To achieve correct filtering, the transfer function SHOULD be decoded before performing linear interpolation.

This would allow us to render the following correctly for example:

- [DamagedHelmet](https://github.com/KhronosGroup/glTF-Sample-Assets/tree/main/Models/DamagedHelmet)
- [BoomBox](https://github.com/KhronosGroup/glTF-Sample-Assets/tree/main/Models/BoomBox)
- [PotOfCoals](https://github.com/KhronosGroup/glTF-Sample-Assets/tree/main/Models/PotOfCoals)

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.