mirror of https://github.com/bjornbytes/lovr.git
Fix Mesh attribute normalization;
Normalize i8 and u8 attribute by default. Forward attribute normalization from glTF accessors.
This commit is contained in:
parent
ed92c4e6db
commit
9d90e83657
|
@ -1220,7 +1220,8 @@ static int l_lovrGraphicsNewMesh(lua_State* L) {
|
|||
.offset = attributes[i].offset,
|
||||
.stride = stride,
|
||||
.type = attributes[i].type,
|
||||
.components = attributes[i].components
|
||||
.components = attributes[i].components,
|
||||
.normalized = attributes[i].type == I8 || attributes[i].type == U8
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -108,7 +108,8 @@ Model* lovrModelInit(Model* model, ModelData* data) {
|
|||
.stride = data->buffers[attribute->buffer].stride,
|
||||
.type = attribute->type,
|
||||
.components = attribute->components,
|
||||
.integer = j == ATTR_BONES
|
||||
.integer = j == ATTR_BONES,
|
||||
.normalized = attribute->normalized
|
||||
});
|
||||
|
||||
if (!setDrawRange && !primitive->indices) {
|
||||
|
|
Loading…
Reference in New Issue