MAMEWorld >> EmuChat
View all threads Index   Flat Mode Flat  

vio
MAME Fan
Reged: 09/30/14
Posts: 8
Send PM
Dynamic Scanlines application
11/11/16 01:29 AM Attachment: sample_output.7z 224 KB (9 downloads)


Hi,

I wrote an application to demonstrate proper generation of scanline effect for LCD-type monitors. You can download the latest version here:
https://github.com/srcstorm/lcd_scanlines/releases

How does it work?
In CRT displays, pixels of black lines are illuminated by active lines. However, this is true for both lines above and below the black line.

In order to simulate a CRT black line, brightness amounts that are coming from each line must be summed.

Static png masks that are used by MAME are not able to achieve this effect (although I prepared some masks that mimic it). So a new method must be used. Maybe HLSL scripts can do this.

Example with 50% scanline brightness:
rgb(200,60,0) ---> pixel of active line above
rgb(75,15,15) ---> pixel of black line
rgb(100,0,60) ---> pixel of active line below

As you see, each active line provides 25% brightness.

I wrote this application as a proof of concept. I'm presenting the idea. If you want to inspect the source code and adapt it to your needs, you can visit the project page:
https://github.com/srcstorm/lcd_scanlines

Edited by vio (11/13/16 11:41 PM)







Entire thread
Subject Posted by Posted on
* Dynamic Scanlines application vio 11/11/16 01:29 AM
. * Re: Dynamic Scanlines application Oomek  12/23/16 06:12 AM
. * Re: Dynamic Scanlines application vio  12/23/16 09:48 PM
. * sRGB color space added vio  11/28/16 02:18 PM
. * Re: Dynamic Scanlines application vio  11/11/16 01:47 PM
. * Re: Dynamic Scanlines application Jezze  11/13/16 02:21 PM
. * Your settings compared to.... Traso  11/29/16 09:27 AM
. * two posts for two images because I can't be bothered with registering with lame image sites..... Traso  11/29/16 09:28 AM
. * Re: Dynamic Scanlines application Traso  11/14/16 01:34 AM
. * Re: Dynamic Scanlines application Jezze  11/14/16 02:06 AM
. * Re: Dynamic Scanlines application Traso  11/15/16 06:24 PM
. * Re: Dynamic Scanlines application Jezze  11/15/16 08:22 PM
. * Re: Dynamic Scanlines application Traso  11/16/16 02:22 AM
. * Re: Dynamic Scanlines application Mr Ric  11/11/16 07:54 PM

Extra information Permissions
Moderator:  Robbbert, Tafoid 
0 registered and 296 anonymous users are browsing this forum.
You cannot start new topics
You cannot reply to topics
HTML is enabled
UBBCode is enabled
Thread views: 2721