microsoft / Win2D

Win2D is an easy-to-use Windows Runtime API for immediate mode 2D graphics rendering with GPU acceleration. It is available to C#, C++ and VB developers writing apps for the Windows Universal Platform (UWP). It utilizes the power of Direct2D, and integrates seamlessly with XAML and CoreWindow.
http://microsoft.github.io/Win2D
Other
1.82k stars 287 forks source link

Win2D renders Ink poorly on low resolution settings #197

Closed Trasteby closed 8 years ago

Trasteby commented 8 years ago

It seems that Win2D renders ink much blurrier than DirectInk's InkCanvas when running on low resolutions. According to my experience, it seems like the issue only appears when you're running on a resolution lower than the display's maximum (so lowering a 4k display to 1080p causes the issue, but on a native 1080p panel the issue isn't there).

The issue itself is that wet ink looks much sharper than dry ink, when the dry ink is rendered by Win2D.

The issue is reproducible with the Win2D example gallery.

Steps to reproduce the problem:

  1. Download Win2D source and examples from here: https://github.com/Microsoft/Win2D (downloaded 2015-12-07)
  2. Open Win2D.uap.sln in Visual Studio 2015
  3. Build ExampleGallery.uap (I built a Release 64-bit binary for sideloading)
  4. Install it on a device where the resolution can be changed. (I installed it on a Surface Pro 3 i3)
  5. Lower the resolution to the lowest possible (in the case of the Surface Pro 3, it was 800x600).
  6. Log out and back in to make sure the issue isn't caused by the resolution change
  7. Open the Win2D Gallery app, and go to the Ink example.
  8. With Stroke Width and Stroke Height as 1, draw a stroke. Notice how the wet stroke looks much sharper than the dry strokes.

It seems that the larger the difference between current resolution and maximum resolution, the more noticable the issue is. Naturally, it is also more noticable on larger screens.

I also want to mention that I think the wet strokes look strangely sharp on such a low resolution. Is it possible that DirectInk is somehow bypassing Windows resolution settings and drawing directly to the screen in full resolution?

I first thought this was a problem in my own app, but after seeing the same problem in the Win2D example gallery, it seems like it's a problem in Win2D itself.

clandrew commented 8 years ago

Thanks for submitting this issue, I'll see if this reproes on our end.

clandrew commented 8 years ago

This reproed on a Surface Pro 3 device, and appears to be specific to that platform.

However, the issue of ink drawing at higher-than-expected resolution wasn't specific to Win2D. It also occurs on the Edge browser and other apps that consume ink on this device.

Verified that Win2D is doing the correct thing with respect to resolution and DPI, and that the app is seeing the correct DPI and reacting accordingly.

clandrew commented 8 years ago

Given this is a broader issue on this device and not something to fix in Win2D, we're not going to take action on it at this time, and so I'll close this issue.

I notified the appropriate teams internal to Microsoft. And of course, if you have any more questions, feel free to re-open, or let us know.