All Projects → zesterer → Euc

zesterer / Euc

Licence: other
A software rendering crate that lets you write shaders with Rust

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to Euc

Tinyrenderer
A brief computer graphics / rendering course
Stars: ✭ 11,776 (+6442.22%)
Mutual labels:  graphics, 3d, rendering
Unity Dithered Transparency Shader
Unity material and shader for applying clipped, dithered transparency
Stars: ✭ 174 (-3.33%)
Mutual labels:  graphics, 3d, rendering
Vxr
General purpose engine written in C++ with emphasis on materials rendering (PBR, clear coat, anisotropy, iridescence)
Stars: ✭ 181 (+0.56%)
Mutual labels:  graphics, 3d, rendering
Hilo3d
Hilo3d, a WebGL Rendering Engine.
Stars: ✭ 123 (-31.67%)
Mutual labels:  graphics, 3d, rendering
Fauxgl
Software-only 3D renderer written in Go.
Stars: ✭ 658 (+265.56%)
Mutual labels:  graphics, 3d, rendering
Tinyraytracer
A brief computer graphics / rendering course
Stars: ✭ 3,971 (+2106.11%)
Mutual labels:  graphics, 3d, rendering
Wechart
Create all the [ch]arts by cax or three.js - Cax 和 three.js 创造一切图[表]
Stars: ✭ 152 (-15.56%)
Mutual labels:  graphics, 3d, rendering
Tinyraycaster
486 lines of C++: old-school FPS in a weekend
Stars: ✭ 1,383 (+668.33%)
Mutual labels:  graphics, 3d, rendering
Im3d
Immediate mode rendering and 3d gizmos.
Stars: ✭ 561 (+211.67%)
Mutual labels:  graphics, 3d, rendering
Renderhelp
⚡️ 可编程渲染管线实现,帮助初学者学习渲染
Stars: ✭ 494 (+174.44%)
Mutual labels:  graphics, 3d, rendering
Renderer
A shader-based software renderer written from scratch in C89
Stars: ✭ 1,366 (+658.89%)
Mutual labels:  graphics, 3d, rendering
Tinykaboom
A brief computer graphics / rendering course
Stars: ✭ 2,077 (+1053.89%)
Mutual labels:  graphics, 3d, rendering
Svg.skia
An SVG rendering library.
Stars: ✭ 122 (-32.22%)
Mutual labels:  graphics, rendering
Cellularforms
An implementation of Andy Lomas' Cellular Forms.
Stars: ✭ 124 (-31.11%)
Mutual labels:  graphics, 3d
Yocto Gl
Yocto/GL: Tiny C++ Libraries for Data-Driven Physically-based Graphics
Stars: ✭ 1,391 (+672.78%)
Mutual labels:  graphics, rendering
Jeelizglassesvtowidget
JavaScript/WebGL glasses virtual try on widget. Real time webcam experience, robust to all lighting conditions, high end 3D PBR rendering, easy to integrate, fallback to server-side rendering
Stars: ✭ 134 (-25.56%)
Mutual labels:  3d, rendering
Building Blocks
A voxel library for real-time applications.
Stars: ✭ 140 (-22.22%)
Mutual labels:  3d, rendering
Deko3d
Homebrew low level graphics API for Nintendo Switch (Nvidia Tegra X1)
Stars: ✭ 103 (-42.78%)
Mutual labels:  graphics, 3d
Svglib
Read SVG files and convert them to other formats.
Stars: ✭ 139 (-22.78%)
Mutual labels:  graphics, rendering
Sharpbgfx
C# bindings for the bgfx graphics library
Stars: ✭ 154 (-14.44%)
Mutual labels:  graphics, rendering

Euc

crates.io crates.io

Utah teapot, rendered with Euc

Example

struct Example;

impl Pipeline for Example {
    type Vertex = [f32; 2];
    type VsOut = ();
    type Pixel = [u8; 4];

    // Vertex shader
    fn vert(&self, pos: &Self::Vertex) -> ([f32; 3], Self::VsOut) {
        ([pos[0], pos[1], 0.0], ())
    }

    // Fragment shader
    fn frag(&self, _: &Self::VsOut) -> Self::Pixel {
        [255, 0, 0, 255] // Red
    }
}

fn main() {
    let mut color = Buffer2d::new([640, 480], [0; 4]);
    let mut depth = Buffer2d::new([640, 480], 1.0);

    Example.draw::<Triangles<_>, _>(
        &[
            [-1.0, -1.0],
            [ 1.0, -1.0],
            [ 0.0,  1.0],
        ],
        &mut color,
        &mut depth,
    );
}

See examples/ for more code examples.

What is euc?

euc is a versatile, simple to use crate that allows 3D rendering on the CPU. It has a portable, compact design that makes it perfect for prototyping ideas, unit testing, or even simple realtime applications. euc is currently under active development.

Why?

  • Modern graphics APIs are complex, verbose beasts. Rendering with the CPU means less complexity, less boilerplate and less verbosity: perfect for testing ideas.

  • Modern CPUs are fast enough to make simple 3D programs run at reasonable speeds (although they are of course no match for GPUs). It's possible to write surprisingly complex realtime 3D software with the CPU only.

  • Not requiring a GPU interface means that euc is incredibly portable. As a result, euc is no_std (if you have a nightly compiler).

  • euc has consistent cross-platform behaviour and doesn't require a GPU to run. This makes it perfect for use as a unit testing tool.

  • Running on the CPU allows a more dynamic approach to data access. For applications in which performance is less of a concern, euc lowers the barrier of low-level 3D development and allows for more novel approaches to graphics rendering to be realised.

Coordinate System

Where possible, euc tries to use a coordinate system similar in nature to OpenGL. If you're used to OpenGL, you'll have no trouble working with euc.

Release Mode

Cargo, by default, compiles Rust code in debug mode. In this mode, very few optimisations are made upon the code, and as a result the performance of software rendering tends to suffer. To experience this project with good performance, make sure to compile with the --release flag.

no_std

euc can be compiled on platforms that lack standard library support. This makes it ideal for rendering 3D graphics on embedded devices. You can enable no_std support by disabling the default features and enabling the libm feature in your Cargo.toml file like so:

[dependencies]
euc = { version = "x.y.z", default-features = false, features = ["libm"] }

Goals

  • Support programmable shaders written in Rust

  • Support common pipeline features such as texture samplers, multiple rendering passes, uniform data, etc.

  • Simple, elegant interface that scales well

  • Correctness

Non-Goals

  • Extreme optimisation (although obvious low-hanging fruit will be picked)

  • Compliance/compatibility with an existing API (i.e: OpenGL)

License

euc is distributed under either of:

at the disgression of the user.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].