Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. How mvp matrices value are applied in Qt3D Example https://doc.qt.io/qt-5/qt3d-simplecustommaterial-example.html

How mvp matrices value are applied in Qt3D Example https://doc.qt.io/qt-5/qt3d-simplecustommaterial-example.html

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 149 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    GuruGE
    wrote on last edited by
    #1

    How mvp (Model view projection) matrices are set in the code as mentioned in the above link code.

    Vertex shader:
    void main()
    {
    // Transform position, normal, and tangent to world coords
    worldPosition = vec3(modelMatrix * vec4(vertexPosition, 1.0));

    // Calculate vertex position in clip coordinates
    gl_Position = mvp * vec4(worldPosition, 1.0);
    

    }

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved