Expand description
§asciirend
. . . .... . . . . .. . ...
. .. ... . . . . .. . .. .
.. .#+===+========+=+=============+=. ..
.. %#######===============++==++.... .
. .. ######%#...........=+==++== ..... .
. ...#######.asciirend.==++=+. ..
.. . %%###...........=++++.. .
. .. #%########+++=+=+== .. . .
.. . . ...########==+=+==... . . . .
. . .. .. ..####%+=++=. .... . ...
. .... ..... .###++=. . .. .. .§Generic ascii renderer
asciirend is a no_std compatible 3D rendering core. This crate renders objects in several
stages:
- Primitive shading (similar to vertex shading, albeit works on whole primitives).
- Fragment shading.
- Additional text pass.
Fragments are shaded in full sRGB float color space, which then is quantized to characters with a
dithering algorithm. This allows the image to have clearer color transitions, as opposed to direct
character shading. This also means the rendering backend is agnostic to the available color space
(so long as it’s not HDR!), which is important for a generic no_std compatible renderer.
Entrypoint to rendering is the Renderer struct.
With std feature, you may also incorporate crossterm crate for out-of-the-box colorful 3D
rendering.
§Example
Please see src/bin/example.rs for usage sample.
Modules§
- color
- Color related types and functions.
- dithering
- Defines dithering trait and implementations.
- extra
- Extra misceleneous structures.
- material
Structs§
- Background
- Describes background parameters.
- Camera
- Describes camera point of view.
- Line
- A line.
- Object
- Properties for a renderable object.
- Renderer
- Immediate mode renderer.
- Triangle
- A triangle.
Enums§
Functions§
- term_
char_ aspect - Returns the assumed aspect ratio of terminal characters.