[Development] Qt3d QShaderData for per entity
Richard Steffen
richard.steffen at pointcab-software.com
Fri Sep 15 15:31:42 CEST 2017
Hi folks,
I try to write special 3D viewer in C++ for geomtry data. For testing
purpose, I create hundreds of simple cube entities. I wrote my own
shader and create a new shared material to all of the cube entities.
The Effect of the material contains already two general parameters that
I can access in my shader as a uniform variable already.
Now I like to give each individual cube special shader parameter. I
thing the component QShaderData is the right place.
Now I wand to add additional parameter for special entities only, so I
create a QShaderData component, add properties "ka" and "kb" and add the
component together with the material and mesh component to my entity.
Unfortunately the shader does not take the properties "ka" and "kb" as
unifrom variables.
I can not find any documentation or example how to use it and access the
data in the shader correctly. Any suggestions?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20170915/7c4ffe6e/attachment.html>
More information about the Development
mailing list