KhronosGroup / KhronosGroup/glTF

glTF 2.0: New KHR_materials_displacement extension

Open
#948 39 comments 15 reactions 0 assignees View on GitHub
extension
Dominant language
HTML
Stars
7.8k
Forks
1.2k
Avg merge
17h 26m
Merged PRs (30d)
5

Description

Regarding displacement, I suggest the following extension. This one is for geometry displacement. If another displacement technique needs to be defined e.g. parallax, a displacementParallax could be defined.

```
{
"materials": [
{
"displacementGeometry": {
"displacementGeometryFactor": 1.0,
"displacementGeometryTexture": 0,
"displacementGeometryOffset": 0.0
}
}
]
}
```

From the texture, the r channel is used. The factor is used to multiply the channel. If no texture is present, the value is take as it is. Finally, the offset is added to the above value.

Contributor guide

Open the contributing guide

Research direction

No files, tests, or entry points are named. Start by reviewing the proposed displacementGeometry JSON and the stated texture-channel, factor, and offset behavior; the work is done when the extension design is agreed and its specification and implementation scope are defined.

Written by the indexing model from the issue text.

Assessment

Domain
computer-graphics
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.