Qt3D default uniform and attributes

a 夏天 提交于 2021-01-27 05:22:17

问题


I began to learn using shaders with QML, and I can't find any references that talk about default uniform and attribute values that are passed to the shaders. In certain examples, we can saw several of them like vertexPosition or modelViewProjection (that is also passed as mvp), but there is no clear list containing all the variables that we can use.

After investigating in Qt source code, I found out default name for many variables:

  1. uniform variables (found in renderview.cpp)
    • modelMatrix
    • viewMatrix
    • projectionMatrix
    • modelView
    • viewProjectionMatrix
    • modelViewProjection
    • mvp
    • inverseModelMatrix
    • inverseViewMatrix
    • inverseProjectionMatrix
    • inverseModelView
    • inverseViewProjectionMatrix
    • inverseModelViewProjection
    • modelNormalMatrix
    • modelViewNormal
    • viewportMatrix
    • inverseViewportMatrix
    • exposure
    • gamma
    • time
    • eyePosition
  2. attributes (found in qattribute.cpp)
    • vertexPosition
    • vertexNormal
    • vertexColor
    • vertexTexCoord
    • vertexTangent

Is that all? These variables are largely sufficient to develop most oh the shaders I am doing right now, but I just want to know if I miss something.


回答1:


to confirm part of what @aRaMinet said source Qt Documentation



来源:https://stackoverflow.com/questions/45858370/qt3d-default-uniform-and-attributes

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!