Skip to content

v0.1

Latest
Compare
Choose a tag to compare
@NoodlesOfWrath NoodlesOfWrath released this 03 Apr 01:42
· 64 commits to main since this release
e6d38c9

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