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

Started by
2 comments, last by BloodOrange1981 10 years, 11 months ago

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?

Advertisement

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

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.

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.

This topic is closed to new replies.

Advertisement