Crates.io | softrender |
lib.rs | softrender |
version | 0.1.0 |
source | src |
created_at | 2017-05-01 12:33:59.21933 |
updated_at | 2017-08-02 14:52:22.704919 |
description | Software Renderer in Rust |
homepage | |
repository | https://github.com/novacrazy/rust-softrender |
max_upload_size | |
id | 12660 |
size | 67,689 |
WIP Software Renderer in Rust
See the Full Example for more info on the above.
f32
RGBA color component for default use,
and nalgebra's Vector4<f32>
can also be used as a color component.image
crate, using the image_compat
cargo feature.Geometry at the edge of the screen is totally messed up, and I don't know how to fix it as of writing this. Any help would be greatly appreciated. I really want to fix it but have no idea how yet.
Although this can chew through millions of triangles per second easy in a single mesh, split that into ten meshes a tenth the size and suddenly it's quite a few times slower.
This is mostly because while rendering meshes, each thread is given a partial empty framebuffer (depth buffer is copied to allow early depth fails), which are all then merged together into the real framebuffer. A single large mesh will allocate less memory overall than many small meshes.
A potential solution to this would be to write an alternative pipeline meant for batch processing meshes, so memory allocation is done once per all meshes, but some more work needs to be done until I can plan that out in more detail.