Closed sunjay closed 5 years ago
You're absolutely correct, thanks for the information! I'll update this now.
I really like your crate by the way! I've managed to write a basic cel shader in it and I'm using that to generate what looks like pixel art from a 3D model.
(The gif is a bit choppy because of the software I used, the renderer is actually very fast!)
Wow, that's very cool!
If you're looking for performance tips... The fragment shader tends to overwhelmingly be the most expensive part of rendering. The less you can put in it, the better.
Thanks! Are you planning to parallelize execution using rayon or anything?
I've considered it. However, doing such a thing is not as trivial as you may expect: it requires doing a fair bit of synchronisation between the depth buffer, rasterizer, etc. (which becomes even more complex when you start trying to use shortcut methods to elide occluded surfaces) One option I've considered is to split the workload up at a much higher level than a GPU, confining whole polygons to a single thread. That way, the overhead of context switching and thread synchronisation is minimised.
If it's something you're very interested in, I can prioritise it?
I am definitely interested! That being said, as an open source maintainer myself, I don't want to burden you. :)
If you think it is possible (and you think it would help with speed), it would definitely be something worthwhile to work on. I am very curious to see what the difference would be.
By the way, the typo is also in the teapot.rs
example. We can probably close this issue once that is fixed.
Thank you for your quick responses! :smile:
Thanks! All fixed now.
Hi, I think there is a typo in this example:
https://github.com/zesterer/euc/blob/d535c6a2a21be10ff8ebb675062696846b9cd084/examples/spinning_cube.rs#L48-L53
Notice the two semicolons at the end. That means that the last matrix won't actually get multiplied in. That should probably be fixed :)
Thanks for the great crate!