Skip to content
View in the app

A better way to browse. Learn more.

ResHax

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Help us keep the site running.

UV map question

Featured Replies

  • Author
  • Localization

verticalD, posted Tue Dec 05, 2017 2:22 pm (30516)


how many ways are there for storing UV coordinates (both x and y) in only 4 bytes (or even 2 bytes) instead of the usual way of using two floats (8 bytes) ?
  • Author
  • Localization

verticalD, posted Tue Dec 05, 2017 5:37 pm (30520)


[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.
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
  • Author
  • Localization

Sir Kane, posted Thu Dec 07, 2017 3:01 pm (30563)


Another option is 16 bit floats.
Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.