Home Artists Posts Import Register

Content

On the path to implement colored lighting, I'm working to improve the accuracy of the color transformation algorithms.

For this video, I've implemented a QuakeC routine to gradually increase and decrease the transparency of some items. The main purpose of this is to test the smoothness of transitions between different blending levels over time. Retroquad uses 16 levels of blending (0 = fully transparent, 1... 14 = semitransparent, 15 = fully opaque), and I'm going to implement 16 levels of dithered interpolation betweet those 16 blending levels, which should effectively allow Retroquad to display 256 levels of transparency.

As you can see in the video, near the lowest transparency values, the entity gets brighter. This is already an improvement, because previously, the entity would get increasingly darker near the lowest transparency levels, in a way that looked worse than this.

There's also an issue with the transparency becoming a stippled checkerboard at a specific level. I'm still figuring out what causes this.

As for the colored lighting, it will use 16 levels of hue with 16 levels of saturation. However, I've already realized that there will be no easy way to interpolate between their levels.

In Retroquad, the brightness channel (i.e. the non-colored lighting) uses 64 levels (6 bits), similarly to Quake's software renderer, but with 2 extra bits that are used for per-pixel interpolation of those 64 levels, effectively giving Retroquad 256 levels of brightness.

However, for colored lighting, Retroquad will use the same channel for both hue and saturation; this means that there will be no extra bits left to interpolate between their 16 levels. So, the quality of the coloration of the light should be inferior to the quality of the light's brightness. I still can't imagine exactly how it will look; my worst fear about this approach is that it may cause some banding in the lighting.

A curious thing about this approach is that it shares a similarity with JPEG compression, in which the hue and the saturation uses less precision than the brightness.

Files

Color blending level issues

Comments

No comments found for this post.