View Single Post
Old 07 January 2017, 22:17   #4
rsn8887
Registered User
rsn8887's Avatar
 
Join Date: Oct 2006
Location: USA
Posts: 726
Toni I verified that all user D3D filters are affected by this slight distortion. Although it is seen easiest in my Nulltest filter switching back and forth between it and the internal NULL filter.

It is almost completely invisible when bilinear scaling is on instead of linear but it is clearly there and reduces picture quality.

I think I understand that the post processing filters from _winuae.fx are applied after all other filters, and that the filter labeled "0" is the one that takes the source material and renders it to the screen.

I think filters labeled <0 are the ones applied to the source texture before it is rendered to the screen, and filters labeled >0 are the ones applied after the source is rendered to the screen but before the _winuae.fx filters are applied?

My sharp_bilinear_filter has to be applied as the "0" filter I think, because it needs to take the source texture and modify it as it is being scaled to the screen size or, better, to the target rectangle, which is not necessary the screen size but could be the window size of UAE's window when it is in windowed mode. A quick test with the filters not equal "0" reveals that there's no difference between the internal null and d3d "nulltest" there. it is Just the important "0" filter where it happens. Of course the other filters from the collection also have to be applied as "0" otherwise they give the wrong results.

I don't quite understand why the internal null filter gives nicer results than a user-made direct3d null filter but something must be different. This is perplexing since that _winuaefx filter is applied anyways at the end and when there's no mask or any other user-selected post processing, that basically IS a d3d null filter. I suspect it doesn't cause distortion because it is only acting on the pre-rendered, pre-scaled surface using that mtx projection.

I can minimize the distortion a bit by subtracting 1/2 texelsize from texcoords in either the vertex or the pixelshader inside NULLtest but it there is still clear distortion visible.

Note that all of these are very subtle effects most easily seen observing the dithered scrollbar background in a workbench window, using auto scaling and POINT filtering.

The internal null filter results in an almost perfect checkerboard, while the user d3d filters will have some checkerboard parts thinner than others.

Last edited by rsn8887; 07 January 2017 at 23:57.
rsn8887 is offline  
 
Page generated in 0.05207 seconds with 9 queries