1. cal64

    OP cal64 Advanced Member
    Newcomer

    Joined:
    Oct 31, 2016
    Messages:
    65
    Country:
    France
    Is it setup in the vertex shader? If so, is there any documentation on that? Or is it something different?

    Thanks for reading, any help is very appreciated!!
     
  2. cal64

    OP cal64 Advanced Member
    Newcomer

    Joined:
    Oct 31, 2016
    Messages:
    65
    Country:
    France
    Ok figured id explain a bit:
    When you declare a vertex attribute, you don't explicitly state what it is (pos, normal, texcoord), just what it's made of.
    I can't seem to find how the gpu then figures out what each atttibute is for.

    Any help?
     
  3. bubble2k16

    bubble2k16 GBAtemp Fan
    Member

    Joined:
    Jul 25, 2016
    Messages:
    467
    Country:
    Senegal
    When you call GPU_SetAttributeBuffers, you set up how many vectors you will send to the vertex shader, and for each vector, how many elements.

    At the vertex shaders, you receive input from your vertex buffers, through the registers v0, v1, ..., after doing the necessary transformations to these vectors, you can then set the final values to the output registers. It is at the point you will decide whether the transformed v0 will be the tex coordinate, position on screen or the colour.
     
  4. cal64

    OP cal64 Advanced Member
    Newcomer

    Joined:
    Oct 31, 2016
    Messages:
    65
    Country:
    France
    Thank you soooooo much!!!
    You can't even imagine how much you helped me there!
     
  5. bubble2k16

    bubble2k16 GBAtemp Fan
    Member

    Joined:
    Jul 25, 2016
    Messages:
    467
    Country:
    Senegal
  6. elhobbs

    elhobbs GBAtemp Advanced Fan
    Member

    Joined:
    Jul 28, 2008
    Messages:
    905
    Country:
    United States
    I just want to mention that if you are doing stuff like this then make sure to test on real hardware - early and often. There are all sorts on sins that emulators will happily work with but will cause the real hardware to lockup immediately or not display correctly. Just my 2 cents.
     
    bubble2k16 and slaphappygamer like this.
  7. cal64

    OP cal64 Advanced Member
    Newcomer

    Joined:
    Oct 31, 2016
    Messages:
    65
    Country:
    France
    Oh wow. Thanks a lot for mentionning that, I wouldn't have expected such a thing :).
    You just saved from potentially a lot of frustration!
     
Draft saved Draft deleted
Loading...

Hide similar threads Similar threads with keywords - attribute, vertex,