Skip to content

D2DAdvancedColorImages colour reproduction issue #1424

@JeffMcClintock

Description

@JeffMcClintock

D2DAdvancedColorImages

I investigated this sample because I want my app to support HDR and wide-colour images. However this example (on Windows 11, RTX 4050 hardware, HDR mode) draws noticeably worse quality images than say Windows own photo viewer. The image is not only brighter and washed-out, but also posturised and has a yellow tinge on the skin. It's like the image bit-depth has been reduced.

D2DAdvancedColorImages on left, Windows photo viewer on right,

Image

It looked just as bad in my own app. However when I increased the precision of the White Scale Effect, the image improved to a much better quality (as good as Windows Photo Viewer). I suggest that your sample code should do the same.

// increase the bit-depth of the filter, else it does a shitty 8-bit conversion. Which results in serious degradation of the image.
if (context_->IsBufferPrecisionSupported(D2D1_BUFFER_PRECISION_16BPC_FLOAT))
{
	auto hr = m_whiteScaleEffect->SetValue(D2D1_PROPERTY_PRECISION, D2D1_BUFFER_PRECISION_16BPC_FLOAT);
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions