Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

D2DAdvancedColorImages colour reproduction issue #1424

Open
JeffMcClintock opened this issue Dec 18, 2024 · 0 comments
Open

D2DAdvancedColorImages colour reproduction issue #1424

JeffMcClintock opened this issue Dec 18, 2024 · 0 comments

Comments

@JeffMcClintock
Copy link

JeffMcClintock commented Dec 18, 2024

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);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant