Refer to attached modified Texture3D demo. I added support for shaders, hopefully allowing to implement transfer function via shaders. For that, I need to be able to modify RGBA value of texture voxels being displayed.
However, does not work as expected.
I am unable to access texture index of voxels being rendered via shader (tried both vertex and fragment).
I did use the latest version. (Error message was caused by vertex shader, where uniform was declared, but not used.)
Refer to attached zip for working version, in the sense that texturecolor is applied via shaders.
However, I wonder if there is a more "GLScene way of doing things":
3D texture. In demo is setup outside GLScene. Would it be possible to use TGLFreeForm for handling vertices drawing, and/or material lib rfor handling texture?
Shaders. I was unable to use TGLSLShader component, as I had no material to connect the component to.
Suggestions to use more GLScene functionality instead of direct OpenGL functionality are highly appreciated.
Ronald,
Yes, instead of DirectOpenGL there is a raw unit GLS.Texture3D with class TGLTexture3D to LoadFromFile a 3dtex to TGLFreeForms or TGLPoints after volume rendering, but it's not ready now. So may be next month or later, if you will not help.
Pavel.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
Refer to attached modified Texture3D demo. I added support for shaders, hopefully allowing to implement transfer function via shaders. For that, I need to be able to modify RGBA value of texture voxels being displayed.
However, does not work as expected.
I am unable to access texture index of voxels being rendered via shader (tried both vertex and fragment).
Any ideas? Am I on the right track or not?
Regards, Ronald
Hi Ronald,
Please use current test projects as exampled in branch, e.g. https://sourceforge.net/p/glscene/code/HEAD/tree/branches/Examples/Textures/Texture3D/ . See shaders demos there also.
PW
Hi Pavel,
I did use the latest version. (Error message was caused by vertex shader, where uniform was declared, but not used.)
Refer to attached zip for working version, in the sense that texturecolor is applied via shaders.
However, I wonder if there is a more "GLScene way of doing things":
Suggestions to use more GLScene functionality instead of direct OpenGL functionality are highly appreciated.
Regards, Ronald
Ronald,
Yes, instead of DirectOpenGL there is a raw unit GLS.Texture3D with class TGLTexture3D to LoadFromFile a 3dtex to TGLFreeForms or TGLPoints after volume rendering, but it's not ready now. So may be next month or later, if you will not help.
Pavel.