Subpixel Camera for a 3D Pixel Art Game Engine

Опубликовано: 20 Октябрь 2020
на канале: t3ssel8r
33,283
535

Date of Recording: 2020-10-10

Following the example of many 2D pixel art games, we render our scene at a low pixel art resolution (640x360) and upscale the result to the screen resolution for presentation. At render-time, the camera is snapped to the nearest "pixel", and when blitting to screen, the snap offset is corrected so that the camera is permitted to smoothly glide over the pixels of the screen at the display's native resolution.

Some extra projections need to be computed in order to ensure that this operation works precisely even when the camera is rotated 45 degrees.

The pixel art shaders were also updated to add contrast in shadowed regions by shading the shadowed regions using a simple monochromatic Lambertian BRDF, resulting in a soft fake ambient lighting effect.