Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. General talk
  3. Qt 6
  4. quick 3d shader and custom geometry
QtWS25 Last Chance

quick 3d shader and custom geometry

Scheduled Pinned Locked Moved Unsolved Qt 6
1 Posts 1 Posters 246 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.
  • L Offline
    L Offline
    LeonZJU
    wrote on 12 Dec 2020, 08:41 last edited by LeonZJU 12 Dec 2020, 08:59
    #1

    [this topic is also post at QML and Qt Quick subcategory: https://forum.qt.io/topic/121711/quick-3d-shader-and-custom-geometry]

    Hi, I am using custom shaders and custom geometry in Quick3d of Qt6. I now have 2 questions:

    1. How to pass a VARYING variable of int type from vertex shader to fragment shader. I need it to be "flat", which is not interpolated.
      ec9871b3-0c47-413e-9a3c-0f34df83b78c-image.png
      When I using int type as the above image, I have this shader compiling errors:
      1f30b400-d4f4-44bb-8220-3b925cfac888-image.png
      I have also tried to add "flat" or "flat in" to the declaration of the "VARYING int patten" and I just couldn't get it right. Can you please give a example of how to use a "VARYING variable" of int type?

    2.When I use custom geometry, it seems that I can add custom Semantic to the vertex data, is this right? While I can use "VERTEX" in vertex shader to access the PositionSemantic vetex data, if I can add custom Semantic, then how can I access the custom Semantic data in vertex shader?
    6339ce7d-b157-423c-95f7-88dfb79e1540-image.png
    If we can't add custom Semantic now, will it be possible to do so in the future version of Qt6?

    Thanks.

    1 Reply Last reply
    0

    1/1

    12 Dec 2020, 08:41

    • Login

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