Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Problems on how to use 3D noise or texture in ShaderEffect
brookmoon last edited by
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.
timday last edited by
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.