Vertex Splitting and tangente space

This topic contains 4 replies, has 2 voices, and was last updated by  dgu 4 years, 7 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • #31355



    i am having problems to run the deferred shading application using my custom model.
    i provided a model with a texture and a bump image (use for normal calculation per pixel i assume ) as well

    the application generate gl error at :
    glVertexAttribPointer(TANGENT_ARRAY, Mesh.sTangents.n, GL_FLOAT, GL_FALSE, Mesh.sTangents.nStride, Mesh.sTangents.pData);

    vertext array not in correct size.
    i am using the 3ds max plugin to export my model and generate the pod with tangent and binormal activated.
    from the doc i can figure the vertex spliting but i dont know what value should go in there.
    as well you have different type for the tangent and bi normal , is assume it s float but what will be the criteria to select other types related to the geometry of the model ?

    thanks alot for your future answer,

    kind regards



    all good i ve got it working



    Thank s alot to provide an example of this wonderfull Technic


    Joe Davis

    Hi David,

    Glad to hear you’ve got it working 🙂

    What was the problem?




    i have an error at the line described because setting of the model.
    1/ the bump image need to be affected in my 3ds max as pvr because it will be not possible to set it , unless you do it in the code during the loadtexture
    as an improvement i wish to see in the PVRSHAMAN shoud show at lease in the material hierarchy the :
    diffuse attribs
    specular attribs
    bump attribs

    2/ the format of the normal and the setting of the bitangent does matter 🙂 that was my doubt, now it ‘ s clear.i missed the float in the normal ,unsigned float it was.

    now my sample base on your code is beautifull ,looking like i always dream about it 🙂
    this sample is well coded , i mean in term of usage of PFX , it s really good,
    i cant live without PFX and POD, it s crazy how it become simple to have a nice layered architecture and control the effect on your model easyyyyyyyyy…..driven by gameplay….

    kind regards

Viewing 5 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic.