27
balte
6y

dammit. I fucking hate it when I get stuck because of low level computing concepts and there is no explanation on Google.

like.. I understand the difference between an int and a float, but no one ever explains how you convert 32bit signed vectors to floats. or how bgra and rgba differ. or how to composite two images on a GPU. etc. the internet is great and all, but fuck, sometimes it seems as everyone is just as dumb as I am.

Comments
  • 3
    Look at the memory structure of floating point numbers, IEEE has a standard for it; you can figure out the conversion from there.
  • 5
    I can't help you with all your questions, but I can explain the difference between rgba bgra. I don't exactly know why they use different types, but both of them represent a color. RGBA stands for red, green, blue and alpha. Where as in BGRA only the order got switched. Here we have blue, green, red and alpha.
    For the color "FFFF00FF" that would mean:
    RGBA:
    Red: FF
    Green: FF
    Blue: 00
    Alpha: FF
    ->yellow
    BGRA:
    Blue: FF
    Green: FF
    Red: 00
    Alpha: FF
    ->cyan
    So the difference between RGBA and BGRA is just the order the bytes are stored in.
  • 0
    @jAsE

    That was very deep...
  • 0
    Here's an example of using these low level concepts to great aplomb, I think you'll appreciate it

    https://en.m.wikipedia.org/wiki/...
Add Comment