Skip to content

Commit

Permalink
ogt_vox: added _ri material support
Browse files Browse the repository at this point in the history
ior is ri - 1.0 (according to VOX4U (unreal 5 plugin)

some of the found values in existing vox files:

key: _ri, value: 1.01
key: _ri, value: 1.02
key: _ri, value: 1.03
key: _ri, value: 1.04
key: _ri, value: 1.09
key: _ri, value: 1.16
key: _ri, value: 1.2
key: _ri, value: 1.3
key: _ri, value: 1.33
key: _ri, value: 1.48
key: _ri, value: 1.52
key: _ri, value: 1.53
key: _ri, value: 1.66
key: _ri, value: 1.71
key: _ri, value: 1.82
key: _ri, value: 1.94
key: _ri, value: 2
key: _ri, value: 2.17
key: _ri, value: 2.33
  • Loading branch information
mgerhardy authored and jpaver committed Aug 29, 2024
1 parent e04b159 commit 1c185fe
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/ogt_vox.h
Original file line number Diff line number Diff line change
Expand Up @@ -1697,6 +1697,11 @@
materials.matl[material_id].content_flags |= k_ogt_vox_matl_have_ior;
materials.matl[material_id].ior = (float)atof(ior_string);
}
const char* ri_string = _vox_dict_get_value_as_string(&dict, "_ri", NULL);
if (ri_string) {
materials.matl[material_id].content_flags |= k_ogt_vox_matl_have_ior;
materials.matl[material_id].ior = (float)atof(ri_string) - 1.0f;
}
const char* att_string = _vox_dict_get_value_as_string(&dict, "_att", NULL);
if (att_string) {
materials.matl[material_id].content_flags |= k_ogt_vox_matl_have_att;
Expand Down

0 comments on commit 1c185fe

Please sign in to comment.