HDR 10 Bit Gradients

I want to compare 8 bit colors to 10 bit colors.

For this my application creates two opengl contexts.

The first context uses 32 bit, 8 bit per color.
The second context uses 64 bit, 16 bit per color.

Standard windows API is used with following pixelformats:

	if mOptionHighDynamicRangeEnabled then
	begin
		// try find a nice HDR r,g,b,a pixel format

		// setup pixel format descriptor
		with mPreferredPixelFormatDescriptor do
		begin
			nSize := SizeOf(TPIXELFORMATDESCRIPTOR);
			nVersion := 1;

			dwFlags :=
			PFD_DRAW_TO_WINDOW or   // support window
			PFD_SUPPORT_OPENGL or   // support OpenGL
			PFD_DOUBLEBUFFER;      // double buffered

			iPixelType := PFD_TYPE_RGBA;  // RGBA type
			cColorBits := 64; // 64-bit color depth

			// apperently these are now ignored because of RGBA ?  ;) :)
			cRedBits := 0;
			cRedShift := 0;

			cGreenBits := 0;
			cGreenShift := 0;

			cBlueBits := 0;
			cBlueShift := 0;

			cAlphaBits := 0;
			cAlphaShift := 0;

			cAccumBits := 0;

			cAccumRedBits := 0;
			cAccumGreenBits := 0;
			cAccumBlueBits := 0;
			cAccumAlphaBits := 0;

			cDepthBits := 0;
			cStencilBits := 0;
			cAuxBuffers := 0;

			iLayerType := PFD_MAIN_PLANE; // main layer

			// ignored:
			bReserved := 0;
			dwLayerMask := 0;
			dwVisibleMask := 0;
			dwDamageMask := 0;
		end;


	end else
	begin

		// normal/sRGB 32 bit r,g,b,a pixel format

		// setup pixel format descriptor
		with mPreferredPixelFormatDescriptor do
		begin
			nSize := SizeOf(TPIXELFORMATDESCRIPTOR);
			nVersion := 1;

			dwFlags :=
			PFD_DRAW_TO_WINDOW or   // support window
			PFD_SUPPORT_OPENGL or   // support OpenGL
			PFD_DOUBLEBUFFER;      // double buffered

			iPixelType := PFD_TYPE_RGBA;  // RGBA type
			cColorBits := 24; // 24-bit color depth

			// apperently these are now ignored because of RGBA ?  ;) :)
			cRedBits := 0;
			cRedShift := 0;

			cGreenBits := 0;
			cGreenShift := 0;

			cBlueBits := 0;
			cBlueShift := 0;

			cAlphaBits := 0;
			cAlphaShift := 0;

			cAccumBits := 0;

			cAccumRedBits := 0;
			cAccumGreenBits := 0;
			cAccumBlueBits := 0;
			cAccumAlphaBits := 0;

			cDepthBits := 0;
			cStencilBits := 0;
			cAuxBuffers := 0;

			iLayerType := PFD_MAIN_PLANE; // main layer

			// ignored:
			bReserved := 0;
			dwLayerMask := 0;
			dwVisibleMask := 0;
			dwDamageMask := 0;
		end;

	end;

	// get the device context's best-available-match pixel format
	// this is cool, this allows me to actually see the real properties
	// of the closest chosen pixel format by the system.
	mChosenSupportedPixelFormat.mPixelFormat :=
		ChoosePixelFormat( ParaDeviceContext, @mPreferredPixelFormatDescriptor );

	if mChosenSupportedPixelFormat.mPixelFormat = 0 then
	begin
		ShowMessage('ChoosePixelFormat failed.');
		ShowMessage('GetLastError: ' + IntToStr(GetLastError) );
	end;

When rendering two quads as follows, one per context:

		glBegin(GL_QUADS);

		// top left black
		glColor3f( 0.0, 0.0, mBlue );
		glVertex2f(0,0);

		// top right red
		glColor3f( 1.0, 0.0, mBlue );
		glVertex2f(ClientWidth,0);

		// bottom red and green
		glColor3f( 1.0, 1.0, mBlue );
		glVertex2f(ClientWidth,ClientHeight);

		// bottom left green
		glColor3f( 0.0, 1.0, mBlue );
		glVertex2f(0,ClientHeight);


		glEnd();

I notice the following:

The 8 bit/sRGB one looks brighter.

The 10 bit/DCI-P3 ? looks darker ?!

This annoys me. I want the HDR one to also be able to reach bright colors ?!

How come the HDR is “darker” ?

I tried setting values outside the range of 0.0 - 1.0. For example 25.0 or 64000.0

But the HDR image remains darker than the SDR image.

Now I am wondering if something is wrong, or if HDR/10 bit is only a “color shift”.

I am wondering if maybe Windows API/back end and such is not capable of “true hdr 10 bit” and maybe this old document is still relevant ?:

My computer has
RTX 4080 TI
Asus PG42UQ monitor.

I play with many settings, nvidia control panel, icc color profiles, monitor settings, windows hdr on/off, it’s a pretty big mess out there… but so far so good.

https://www.wide-gamut.com/test

^Not sure if this site is any good, but it does seem to show some difference between bright and dark reds when hdr is supposedly to be on, though this behaviour can be overriden with icc profiles it seems ? Even for “standard color profiles”, Windows 11 also has new advanced color profiles, have not found any on the internet yet.

Tried windows calibration tool, set saturation to 50%. Rest as my eyes see the dark and brightness.

I am also confused if youtube and firefox/edge browsers will automatically render the content in the viewing area for the video in HDR if it detects HDR movie/video or if it’s standard sRGB ?!? It seems to have nicer colors inside the viewing rectangle.

I will also investigate further into color gamuts.

I am starting to suspect there might not be so much difference between sRGB and DCI-P3.

Then again this monitor does show better colors than HP laptop and such.

What I am most interested in is seeing less “banding” during color gradients/slides from RED to GREEN.

Or Light green to Dark green.

But on different youtube videos still plenty of gradients/banding visible, though this could be because of “compression/codec”.

The problem with my own app is the brightness or darkness of the colors.

SDR/8 bit is very bright, HDR/10 bit is very dark.

So this monitor seems to be “hiding” gradients/banding by either making many colors same color either bright or dark.

So I am a bit annoyed with that ?!