Skip to content

Releases: ABC-Engine/lumenpyx

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