English Amiga Board


Go Back   English Amiga Board > Support > support.WinUAE

 
 
Thread Tools
Old 09 September 2008, 00:18   #1
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 3,343
OpenGL filter issue/bug

Hi,

There are a couple of problems with WinUAE's output filters.

The first is pretty minor. Start WinUAE. Make sure no filter is selected. Boot Workbench (3.1), and run Overscan prefs from the Extras disk. The full range of 283 lines is visible in the WinUAE display. Enable the Null, Direct3D or OpenGL filter with Horiz. and Vert. size both 1x. Now the bottom two scanlines are not visible. On an interlaced Workbench screen, that means the bottom 4 lines are not visible if you use maximum vertical overscan. If you enable vertical centering in the Display page, the bottom lines are displayed correctly.


The next problem seems to be specific to the OpenGL filter. Note that I'm using the nVidia WHQL Vista graphics driver. The same effect appears when using the nVidia Linux driver & Wine. Can anyone with another make of graphics chip confirm this?

With the null or Direct3D filters, when horiz. and vert. size are both set to 1x, WinUAE displays an exact 1:1 representation of the Amiga screen pixels, as it should. However, with the OpenGL filter some columns or rows are missing or duplicated in the output. Exactly how many depends on the size of the WinUAE window, even though the filter output is 1x. The wider & taller the window, the more rows/columns are affected. If you resize the WinUAE window to at least 1024 pixels wide, the output completely messes up (the Amiga display doubles in width). See the attached pictures.

To demonstrate this, use WBPattern preferences to select the chequered background (bottom left in the 8 presets). If you look closely, you should see the missing/added rows and columns. (If you have an LCD screen, dragging the WinUAE window around may help to show where they are.)
Attached Thumbnails
Click image for larger version

Name:	Pic1.png
Views:	258
Size:	28.8 KB
ID:	17875   Click image for larger version

Name:	Pic2.png
Views:	239
Size:	17.3 KB
ID:	17876   Click image for larger version

Name:	Pic3.png
Views:	231
Size:	45.3 KB
ID:	17877   Click image for larger version

Name:	Pic4.png
Views:	256
Size:	50.0 KB
ID:	17878   Click image for larger version

Name:	Pic5.png
Views:	225
Size:	30.0 KB
ID:	17879  

mark_k is offline  
Old 09 September 2008, 06:40   #2
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 3,343
The code that's causing the strange doubling of horizontal zoom seems to be this in opengl.c:
Code:
    xm = 2 >> currprefs.gfx_resolution;
    ym = currprefs.gfx_linedbl ? 1 : 2;
    if (w_width >= 1024)
        xm *= 2;
    else if (w_width < 500)
        xm /= 2;
    if (w_height >= 960)
        ym *= 2;
    else if (w_height < 350)
        ym /= 2;
The code just after that reads:
Code:
    fx = (t_width * xm - w_width) / 2;
    fy = (t_height * ym - w_height) / 2;

    x1 = (float)(w_width * currprefs.gfx_filter_horiz_offset / 1000.0);
    y1 = (float)(w_height * currprefs.gfx_filter_vert_offset / 1000.0);
    x2 = x1 + (float)((required_texture_size * w_width / t_width) * multx);
    y2 = y1 + (float)((required_texture_size * w_height / t_height) * multy);
    x1 -= fx; y1 -= fy;
    x2 += 2 * fx; y2 += 2 * fy;
Note: I have little C knowledge (and pretty much no OpenGL knowledge). But wouldn't you lose some precision in those calculations? It probably wouldn't cure the problem, but would this be any better?
Code:
    fx = (t_width * xm - w_width);
    fy = (t_height * ym - w_height);

    x1 = (float)(w_width * currprefs.gfx_filter_horiz_offset / 1000.0);
    y1 = (float)(w_height * currprefs.gfx_filter_vert_offset / 1000.0);
    x2 = x1 + (float)(multx * required_texture_size * w_width / t_width);
    y2 = y1 + (float)(multy * required_texture_size * w_height / t_height);
    x1 -= fx / 2; y1 -= fy / 2;
    x2 += fx; y2 += fy;

Last edited by mark_k; 09 September 2008 at 06:59.
mark_k is offline  
Old 09 September 2008, 08:09   #3
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,518
OpenGL filter is garbage. It will need complete rewrite as said in some beta changelog.
Toni Wilen is online now  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Bug]WinUAE filter settings slider behavior NoX1911 support.WinUAE 1 27 May 2011 21:29
WinUAE Video capture, Bug, issue or working as intended ! Mad-Matt support.WinUAE 3 24 July 2010 11:36
Sound is muffled after boot until change of settings - sound filter emulation issue? rsn8887 support.WinUAE 1 30 May 2010 20:44
OPENGL problem mtb support.WinUAE 6 13 January 2003 16:05
OpenGL Mode questions... CRL support.WinUAE 0 05 December 2002 08:57

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 10:52.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.06947 seconds with 16 queries