Skip to content

Releases: ABC-Engine/lumenpyx

v0.2

01 Jun 22:27
Compare
Choose a tag to compare

What's new?

  • Text support using parley
  • Animation support
  • Drawable mixing
  • Pixel Based Positioning
  • Optional increased render area for reflections (so that there aren't parts of the reflections that are reflecting offscreen)
  • Caching textures (Increases performance by ~3x)
  • Instancing textures (before identical draw objects with different transforms were O(n), now the fixed cost is only paid once so it is near O(1))
  • Optional reflection blurring (scaled based on distance squared)
  • Improved debug messages
  • split draw into 4 different draw calls to prevent context switching (~4x increase in performance)

In total, there should be about a ~12x increase in performance over v0.1, depending on what it's being used for.
Note: These are just estimates for the performance, I did limited benchmarks which I used to test performance for these estimates.

Various bug fixes

  • Rotations were previously broken in v0.1 transforms
  • Various scaling issues
  • Refactored the draw_all function which was previously not very easily readable

v0.1

03 Apr 01:42
e6d38c9
Compare
Choose a tag to compare

Announcing Lumenpyx: A Flexible Pixel Art Renderer with Realistic Lighting

Hey, a couple months ago I was looking to integrate a renderer with realistic pixel art lighting into my game engine. I couldn't find any rust libraries that did this, so I started this project. To do the lighting I gave each sprite an associated heightmap, we use this heightmap to trace lines between every pixel and the light source(s), to determine if it is illuminated.

Screen Space Reflection

Another feature that this renderer has is screen space reflection, which I have not seen in many renderers. Each sprite has an associated roughness map 0-1 and normal map which shows which direction each pixel faces in a normalized vector. Unless otherwise specified we generate a normal map automatically with the heightmap. We trace a line from the camera to every pixel that has a roughness value of more than 0. We reflect this line based on the normal value at the pixel and see where it lands. We then mix this value with the base color of the pixel depending on the roughness.

Here is an example that renders the scene
carbon (1)

Here is a more complicated demo scene (if it doesn't load you can view it here):

output.mp4