Allen Webster c650d41a82  

bin  
src  
.gitignore  
LICENSEGPL3.txt  
README.md  
project.4coder 
README.md
Copyright
Copyright (C) 2023 Allen Webster https://mr4th.com
Distributed with GPL 3 license (full license in LICENSEGPL3.txt)
Contact
Purpose
This is a standalone Win32 OpenGL application that works as a set of experiments to demonstrate the behavior and effect of SRGB conversions and antialiasing techniques
In the final output program, the left side shows the gammanaive results where no SRGB conversions are applied to input colors or to output colors. The right side shows the gammaaware results where input colors are converted from SRGB to Linear RGB, and output colors are converted from Linear RGB to SRGB.
From top to bottom the experiments are:

A gradient which goes white (1,1,1) to black (0,0,0) interpolated linearly by alpha = (x  left)/(right  left) color = (1,1,1)(1  alpha) + (0,0,0)(alpha)

Pulls out three colors into solid color blocks: (0,0,0), (0.5,0.5,0.5), and (1,1,1)

Tests sRGB > Linear approximation function. (Right side only) Compares two discrete gray pallets. The top shows 16 levels of gray by sampling them from an SRGB texture. The bottom shows the same 16 gray values with the input colors converted from sRGB > Linear by x^2.2 instead of by texture sampling.

Tests color gradients (1,0,0) >>> (1,1,0) (1,1,0) >>> (0,1,0) (0,1,0) >>> (0,1,1) (0,1,1) >>> (0,0,1) (0,0,1) >>> (1,0,1) (1,0,1) >>> (1,0,0)

Tests partial transparency 3 horizontal stripes  opaque 3 vertical stripes  alpha = 0.5 3 vertical stripes  alpha = 0.75

Tests rectangle antialiasing by drawing rectangles with a width of 2 placed at various subpixel positions

Tests circle antialiasing by drawing three circles of various radii. The circle antialiasing is computed with a highly accurate areaunderthecurve integration method  see the "sanity test" functions for how the accuracy of the pixel coverage is verified.

Tests circle antialiasing with colored backgrounds and shape colors to see if antialiasing gives rise to any colored fringes.
In the topleft corner there is a gamma calibration test image. The top left corner is "0.5 Gray" in the "Linear color space" and the bottom right corner is "0.5 Gray" in the "sRGB color space". The other two corners are identical blackandwhite checkerboards. When squinting to physically blur the checkerboard, the brihgtness should resemble the brightness of the top left corner on a correctly calibrated monitor.
The antialiasing of the rectangles and circles should also look better on linear color space side for a correctly calibrated monitor.