All Projects → phaazon → Luminance Rs

phaazon / Luminance Rs

Licence: other
Type-safe, type-level and stateless Rust graphics framework

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to Luminance Rs

Imogen
GPU Texture Generator
Stars: ✭ 648 (+2.53%)
Mutual labels:  opengl, shaders, texture, gpu
Pex Context
Modern WebGL state wrapper for PEX: allocate GPU resources (textures, buffers), setup state pipelines and passes, and combine them into commands.
Stars: ✭ 117 (-81.49%)
Mutual labels:  buffer, texture, gpu
Python Opengl
An open access book on Python, OpenGL and Scientific Visualization, Nicolas P. Rougier, 2018
Stars: ✭ 441 (-30.22%)
Mutual labels:  opengl, shaders, gpu
Ultralight
Next-generation HTML renderer for apps and games
Stars: ✭ 3,585 (+467.25%)
Mutual labels:  opengl, gpu
GPU-Zen-2-Baker
🥧 An OpenGL 4.x example of GPU Zen 2's ray casting techniques for baked texture generation chapter.
Stars: ✭ 32 (-94.94%)
Mutual labels:  shaders, texture
Tinyengine
Tiny OpenGL Wrapper / 3D Engine in C++
Stars: ✭ 251 (-60.28%)
Mutual labels:  opengl, shaders
Gl Engine
Rendering Engine using C++ and OpenGL
Stars: ✭ 237 (-62.5%)
Mutual labels:  opengl, shaders
Shadergen
Proof-of-concept library for generating HLSL, GLSL, and Metal shader code from C#,
Stars: ✭ 395 (-37.5%)
Mutual labels:  opengl, shaders
Rendu
A simple realtime graphics playground for experimentations.
Stars: ✭ 343 (-45.73%)
Mutual labels:  opengl, gpu
Matcaps
Huge library of matcap PNG textures organized by color
Stars: ✭ 607 (-3.96%)
Mutual labels:  opengl, texture
Renderhelp
⚡️ 可编程渲染管线实现,帮助初学者学习渲染
Stars: ✭ 494 (-21.84%)
Mutual labels:  opengl, shaders
Open3d
Open3D: A Modern Library for 3D Data Processing
Stars: ✭ 5,860 (+827.22%)
Mutual labels:  opengl, gpu
Gfx
[maintenance mode] A low-overhead Vulkan-like GPU API for Rust.
Stars: ✭ 5,045 (+698.26%)
Mutual labels:  opengl, gpu
Simplerenderengine
Small C++14 render engine
Stars: ✭ 253 (-59.97%)
Mutual labels:  opengl, shaders
Diligentcore
Core functionality of Diligent Engine
Stars: ✭ 263 (-58.39%)
Mutual labels:  opengl, shaders
Shadered
Lightweight, cross-platform & full-featured shader IDE
Stars: ✭ 3,247 (+413.77%)
Mutual labels:  opengl, shaders
Shader Doodle
A friendly web-component for writing and rendering shaders.
Stars: ✭ 356 (-43.67%)
Mutual labels:  shaders, texture
Visbrain
A multi-purpose GPU-accelerated open-source suite for brain data visualization
Stars: ✭ 172 (-72.78%)
Mutual labels:  opengl, gpu
React Imgpro
📷 Image Processing Component for React
Stars: ✭ 2,186 (+245.89%)
Mutual labels:  opengl, shaders
Glchaos.p
3D GPUs Strange Attractors and Hypercomplex Fractals explorer - up to 256 Million particles in RealTime
Stars: ✭ 590 (-6.65%)
Mutual labels:  opengl, gpu

luminance logo

luminance, the elegant, safe, type-safe, stateless and simple graphics crate

Build Status crates.io docs.rs License

History

luminance is an effort to make graphics rendering simple and elegant. It was originally imagined, designed and implemented by @phaazon in Haskell (here) and eventually ported to Rust in 2016. The core concepts remained the same and the crate has been slowly evolving ever since. At first, used only by @phaazon for his Rust demoscene productions (example here and here, using spectra) and a bunch of curious peeps, it now has more visibility among the graphics ecosystem of Rust.

Currently, that ecosystem is spread into several crates, ideas and people. It is highly recommended to read the great article about the ecosystem by @Icefoxen, here.

However, luminance is a bit different from what it was initially imagined for. People are looking for an easy-to-use crate, with good abstractions and safe-guards against all the bad and dangerous graphics API caveats. luminance has always been about providing a safe, type-safe and elegant API (being Haskell-based makes it heavily use the type system, for instance) but it now has a more unique niche in the ecosystem. Where gfx-hal provides an experience focused on down-to-metal performance and an API very similar to Vulkan’s, luminance provides an API that is, for sure, a bit higher-level, and not Vulkan-based — and hence, yes, it likely won't give you the same performances as with gfx-hal (though no benchmarks have been done so far) — but easier to start with, especially if you don’t already have a background experience with OpenGL or Vulkan.

The strengths of luminance are:

  • Easy to learn: the concepts, based on OpenGL, are applied to graphics, not general-purpose programming on GPU. Using luminance will help you wrap your fingers around what graphics programming is about and it will help you, perhaps, to jump to lower abstractions like gfx-hal, if you ever need to.
  • Performant: by using Rust and being designed around the concept of good performances, luminance should allow you to build nice and fast simulations, animations and video games. Remember that games you played years ago didn’t have Vulkan and were impressive nonetheless. It’s unlikely you will get 100% out of your GPU by using luminance since it’s built over technologies that are not using 100% of your GPU. Unless you need and know exactly why you need 100% of your GPU, you should be just fine™.
  • Elegant: the design is heavily based on functional programming concepts such as typeclasses, associated types, singleton types, existentials, contravariant resources, procedural macros, strong typing, etc. Plus, every bit of possible stateful computations is hidden behind a system of smart state, removing the need to worry about side-effects. luminance still has mutation (unless its Haskell version) but the Rust type system and borrow checker allows for safe mutations.
  • Modern: the whole luminance ecosystem tries its best to stay up-to-date with Rust evolutions and features. On the same level, the underlying technologies are kept up-to-date and might even be replaced if modern, better-suited alternatives emerge (similarly, Vulkan support might eventually get added, though there are no immediate plans to do so).
  • Opinionated enough: a big bet with luminance was to make it opinionated, but not too much. It needs to be opinionated to allow for some design constructs to be possible, optimize performance and allow for extra safety. However, it must not be too opinionated, lest it become a framework. luminance is a library, not a framework, meaning that it will adapt to how you think you should design your software, not the other way around (within the limits of safe design). luminance won't tie your hands.

The luminance ecosystem

It is currently composed of several different crates:

Core crates

  • luminance: the core crate, exposing a graphics API that aims to be easy to learn, safe, type-safe, stateless and fun!
  • luminance-derive: a companion crate to luminance you’re very likely to enjoy; it will help you derive important traits for your application or library to work. You should definitely invest some time in the documentation of this crate; it’s easy and well explained.
  • luminance-front: a front facing set of luminance re-exports to make it easy to use the library as a end-user developer by picking a backend type at compile-time, most of the time based on your compilation target.

Backend crates

  • luminance-gl: a crate gathering OpenGL backends. Several versions might be supported.
  • luminance-webgl: a crate gathering WebGL backends. Several versions might be supported.

Platform crates

Other crates

Learning

luminance has two main and official resources to learn:

  • The book. It contains various chapters, including tutorials and onboarding newcomers. It will not provide you with the best description of a given feature as it focuses more on the overall comprehension and explaining than code directly. It also fits people who don’t know anything about rendering.
  • The examples. They are like unit tests: each introduces and focuses on a very specific aspect or feature. You should read them if you are interested in a specific feature. They’re not well suited to learn from scratch and they are weaker than a structured tutorial but more concise.

You should try both ways and see which one fits the best for you!

Contributing

Please read the CONTRIBUTING document.

Dependent projects

Those projects use luminance:

Licenses

luminance is licensed under BSD-3-Clause and the logo is under CC BY-ND.

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].