March 13, 2012

brookmoon brookmoon
Lab Rat
1 posts

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

 

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

November 30, 2014

timday timday
Ant Farmer
51 posts

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.

 
  ‹‹ [solved] How to make mouse area in mouse area      POLYGONS in QML ››

You must log in to post a reply. Not a member yet? Register here!