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. Problems on how to use 3D noise or texture in ShaderEffect
QtWS25 Last Chance

Problems on how to use 3D noise or texture in ShaderEffect

Scheduled Pinned Locked Moved QML and Qt Quick
2 Posts 2 Posters 2.0k 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.
  • B Offline
    B Offline
    brookmoon
    wrote on last edited by
    #1

    In QML Quick2.0, Image or ShaderEffectSource can be maped to be sampler2D type in GLSL, but we don't have any mapping for sampler3D. Then how can we use 3D noise or texture in the shader? I am wondering this is not supported currently in QT5, or is there other way to implement this? Your help is highly appreciated.

    1 Reply Last reply
    0
    • timdayT Offline
      timdayT Offline
      timday
      wrote on last edited by
      #2

      I find myself wanting to do the same thing as the post above: somehow get an OpenGL 3D texture accessible to sampler3D/texture3D stuff in the GLSL in a ShaderEffect used in some QML... and the above appears to be the one and only Google hit relating to doing this. Sure, I can do what I need to do entirely with C++ and a subclassed QQuickFramebufferObject, but really once the 3D texture is there in the OpenGL domain doing the rest in GLSL in a QML ShaderEffect would be just so much more lightweight it's a bit of a shame to have to resort to the C++ hammer.

      Is there some workround I'm missing, or is there some undocumented way of getting a 3D texture into a ShaderEffect?

      If not... tempting to put it in as a Jira wishlist item. Arguments against might be that 3D textures aren't included in un-extended OpenGLES2. On the other hand, apparently more recent iOS and Android devices are ES3 which does support it.

      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