Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


odd texture co ordinates...any one care to explain?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 BloodOrange1981   Members   -  Reputation: 240

Like
0Likes
Like

Posted 07 May 2013 - 11:24 PM

HI! I saw something puzzling today. Someone using 16 bit unsigned ints as texture co ordinates, with a 0x3c00 as`1.0f` and of course 0x0000 as `0.0f`.

These are then fed into the GPU as if they were 16 bit floats! 

 

However I`m completely puzzled as to how and why this would even work. Any ideas?


Edited by BloodOrange1981, 07 May 2013 - 11:25 PM.


Sponsor:

#2 Ashaman73   Crossbones+   -  Reputation: 7987

Like
0Likes
Like

Posted 07 May 2013 - 11:59 PM

Seems like half-floats (16bit floats). 0x3c00 is the hex presentation of 1.0 as 16-bit float. Take a look here.


Edited by Ashaman73, 08 May 2013 - 12:00 AM.


#3 MichaelNIII   Members   -  Reputation: 195

Like
0Likes
Like

Posted 08 May 2013 - 12:02 AM

I may be wrong but I think it may have to do with him using his own vertex shader which can accept whatever format you set it up to use.

#4 BloodOrange1981   Members   -  Reputation: 240

Like
0Likes
Like

Posted 08 May 2013 - 01:20 AM

Seems like half-floats (16bit floats). 0x3c00 is the hex presentation of 1.0 as 16-bit float. Take a look here.

 

Thank you very much for the link! That's another mystery solved, and another new thing learned today.






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS