Joined: Thu May 18, 2017 10:35 am Posts: 9
|
[this is for people who might come here from google] My problem got solved. it turns out there were two bytes giving the x and y coords. so I just did this >
int bytex= reader.ReadByte(); float x = (float)bytex / 255; int bytey= reader.ReadByte(); float y = (float)bytey / 255;
so basically for any type of uv coords value other than float:
int value= reader.<read the byte(bytes)> float actualValueInFloat = (float)value/type.Maxvalue) //where type.Maxvalue gives the maximum number allowed in the value type)
Im not saying this would work for every scenario. but you should give it a try
|
|