Even though it’s a grayscale value, Model I/O expects the
roughness property semantic to be a
You can test this in
final by editing
cube.mtl. Put a
# in front of
map_roughness etc, and add the new property:
roughness 1.0 1.0 1.0
PBR.metal, after loading
roughness in the fragment shader, add
That will make the cube white.
If you then change
float3 to be
Submesh, and in
roughness 1.0 1.0 1.0 to
roughness 1.0, the cube will render in black.
Alternatively, you could simply
print out the value after reading it in
Submesh of course.
Note: I realised this anomaly in Model I/O fairly late on, and sadly it doesn’t look like the
.float3 correction made it to the sample code.