-
-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Instances with color? #234
Comments
Good point (as always 🙂 ). This is basically the same problem as the vertex buffers for |
Looks good! I can see if I can test it soemtimes this week. I think the most powerful would be if the instance colors were multiplied with the existing vertex (and texture) colors. That would allow users to tint meshes and/or make some of them more or less transparent. |
No worries, I will also make a test example (also to test/showcase per instance texture transforms), just wanted to make sure it's in the right direction 🙂 I agree, when this is done, the albedo will be calculated by
This is assuming the material support per-vertex colors (which most of them does). However, right now, the per-instance color is only used if the per-vertex colors are specified, which, now I write it, doesn't really make sense. So I will change it such that you can specify either the per-vertex color or the per-instance color or both 💪 |
I have merged the changes (#239), so now per instance colors are supported and they can also be combined with per vertex colors 💪 I haven't made a test case (but I did test it) because I think a point cloud is a nice test case so the test case will be part of #242. In addition, I want to split the |
I split the transformation into position, rotation and scale so I'm going to close this issue. @emilk hope it solved your problem 🙂 |
I finally got around to try out the new The first: The second: I started out creating an Otherwise: works great, thanks so much! |
No problem 🙂 and thanks for the feedback 👍 I will merge #250 soon and about the second problem, I think it should be possible to avoid errors in that case, but I'll need to take a closer look before I am certain. In any case I agree that it should not be a silent error, I always try to avoid that but can sometimes be difficult when working with graphics 🙂 |
Yeah, the second problem was just a mistake from my side, I have fixed both issues 💪 |
Currently
three_d::Instance
has ageometry_transform
and atexture_transform
. I would be interested in extending that with color (albedo).This sparks two questions:
texture_transform
which I'm not using; addingalbedo
will increase the cost for those not using that)One solution is to replace
Vec<Instance>
with a SoA solution:Of course this increases the complexity of the implementation.
Anyway, I just wanted to open the discussion.
The text was updated successfully, but these errors were encountered: