English Amiga Board


Go Back   English Amiga Board > Support > support.FS-UAE

 
 
Thread Tools
Old 05 March 2013, 00:43   #1
Retro-Nerd
Missile Command Champion

Retro-Nerd's Avatar
 
Join Date: Aug 2005
Location: Germany
Age: 47
Posts: 11,736
Scanline modifications wanted

For the moment i would like to see a nonlinear update like this from WinUAE

WinUAE D3D scanlines, 2:2, 30% opacity



Your scanlines-nonlinear shader.



The scanlines looks similar, but i like a bit more opacity.

I also like the caligari scanlines shader, which works perfectly in bsnes/higan. The scanlines looks good and the blur is pretty much what i'm looking for. Sadly it doesn't work properly in FS-UAE, tried different zooms. Maybe it need some tweaks. Can't take a proper screenshot with the distortions in FS-UAE though.

bnes/higan - caligari scanlines


Last edited by Retro-Nerd; 05 March 2013 at 01:05.
Retro-Nerd is offline  
Old 07 March 2013, 20:08   #2
FrodeSolheim
FS-UAE Developer

FrodeSolheim's Avatar
 
Join Date: Dec 2011
Location: Førde, Norway
Age: 38
Posts: 3,547
Quote:
Originally Posted by Retro-Nerd View Post
For the moment i would like to see a nonlinear update like this from WinUAE

WinUAE D3D scanlines, 2:2, 30% opacity



Your scanlines-nonlinear shader.



The scanlines looks similar, but i like a bit more opacity.
Hi, you can try tweaking it if you like. If you open scanlines-nonlinear.shader, you'll find these two files:
Code:
float ia = (128.0 - 10.0) / 255.0 +
        ((rgb.r + rgb.g + rgb.b) / 3.0) / 2.0;
gl_FragColor = rgb * vec4(ia, ia, ia, 1.0);
You can for example insert this line right before gl_FragColor..:
Code:
ia = ia * 0.8;
So you'll get:
Code:
float ia = (128.0 - 10.0) / 255.0 +
        ((rgb.r + rgb.g + rgb.b) / 3.0) / 2.0;
ia = ia * 0.8;
gl_FragColor = rgb * vec4(ia, ia, ia, 1.0);
(if it's not opaque enough, try with 0.7, or 0.6, etc )

Quote:
Originally Posted by Retro-Nerd View Post
I also like the caligari scanlines shader, which works perfectly in bsnes/higan. The scanlines looks good and the blur is pretty much what i'm looking for. Sadly it doesn't work properly in FS-UAE, tried different zooms. Maybe it need some tweaks. Can't take a proper screenshot with the distortions in FS-UAE though.

bnes/higan - caligari scanlines

It looks like it works just fine. One issue with some of these shaders is that they assume pixels are not already doubled - which they generally are in *UAE to account for high-res/low-res/interlaced graphics.

Try using the shader with the following options:
Code:
low_resolution = 1
line_doubling = 0
Here's how a cropped sections looks like on my 1920x1080 display with lowres:


Quite nice shader actually

Last edited by FrodeSolheim; 07 March 2013 at 20:14.
FrodeSolheim is offline  
Old 07 March 2013, 20:13   #3
FrodeSolheim
FS-UAE Developer

FrodeSolheim's Avatar
 
Join Date: Dec 2011
Location: Førde, Norway
Age: 38
Posts: 3,547
Quote:
Originally Posted by Retro-Nerd View Post
Can't take a proper screenshot with the distortions in FS-UAE though.
Btw, when you use the built-in screenshot function (F12+s or PrintScrn when having input grab), it will also save a screenshot of the OpenGL buffer (blablabla-real-date-xx.png). The "crop"/"full" screenshots are from the Amiga video output, while the "real" one is a proper screenshot of a complete OpenGL frame.
FrodeSolheim is offline  
Old 07 March 2013, 20:29   #4
spajdr
Old fart
spajdr's Avatar
 
Join Date: Feb 2003
Location: Ostrava/Czech Republic
Age: 41
Posts: 309
Send a message via ICQ to spajdr
Yeah more scanline pr0n!
spajdr is offline  
Old 07 March 2013, 20:38   #5
Retro-Nerd
Missile Command Champion

Retro-Nerd's Avatar
 
Join Date: Aug 2005
Location: Germany
Age: 47
Posts: 11,736
Quote:
Originally Posted by FrodeSolheim View Post
Hi, you can try tweaking it if you like. If you open scanlines-nonlinear.shader, you'll find these two files:
Code:
float ia = (128.0 - 10.0) / 255.0 +
        ((rgb.r + rgb.g + rgb.b) / 3.0) / 2.0;
gl_FragColor = rgb * vec4(ia, ia, ia, 1.0);
You can for example insert this line right before gl_FragColor..:
Code:
ia = ia * 0.8;
So you'll get:
Code:
float ia = (128.0 - 10.0) / 255.0 +
        ((rgb.r + rgb.g + rgb.b) / 3.0) / 2.0;
ia = ia * 0.8;
gl_FragColor = rgb * vec4(ia, ia, ia, 1.0);
(if it's not opaque enough, try with 0.7, or 0.6, etc )
Mmh, this ia = ia * 0.8; doesn't work properly. I get scanlines on bright white areas. It destroys the nonlinear effect. I did it exactly as you said.


For caligari scanlines: You are right, it works fine with lores & non-doubled pixels. Sadly games with small text fonts looks terrible then, but the most lores games are fine.
Retro-Nerd is offline  
Old 17 July 2013, 16:51   #6
Retro-Nerd
Missile Command Champion

Retro-Nerd's Avatar
 
Join Date: Aug 2005
Location: Germany
Age: 47
Posts: 11,736
Any chances that you modify (or least the option for) your scanlines-nonlinear-blur.shader to match the saturation/color hue from TysonJacobs D3D CRT shader?

http://eab.abime.net/support-winuae/...e-release.html
Retro-Nerd is offline  
Old 20 August 2013, 17:29   #7
FrodeSolheim
FS-UAE Developer

FrodeSolheim's Avatar
 
Join Date: Dec 2011
Location: Førde, Norway
Age: 38
Posts: 3,547
Quote:
Originally Posted by Retro-Nerd View Post
Any chances that you modify (or least the option for) your scanlines-nonlinear-blur.shader to match the saturation/color hue from TysonJacobs D3D CRT shader?
An update on this thread; Retro-Nerd got a shader I modified which has greatly exaggerated saturation/colors (not something for my taste though)

Quote:
Originally Posted by Retro-Nerd View Post
FS-UAE won't support HLSL, as FS-UAE uses OpenGL and thus GLSL. It does not really matter, as both languages to the same thing.

I will not be creating CRT emulation shaders myself, but there does exist CRT / curvature shaders in correct format already (some are even included in FS-UAE). I'll only be maintaining relatively simple shaders myself...

If the existing "CRT shaders" are not good enough, your only hope is that someone else steps up to the challenge

Last edited by FrodeSolheim; 20 August 2013 at 20:34.
FrodeSolheim is offline  
Old 20 August 2013, 20:16   #8
Retro-Nerd
Missile Command Champion

Retro-Nerd's Avatar
 
Join Date: Aug 2005
Location: Germany
Age: 47
Posts: 11,736
Quote:
An update on this thread; Retro-Nerd got a shader I modified which has greatly exaggerated saturation/colors
Many thanks again for that, Frode. FYI: I use the test.shader in the "shaders" folder. You can tinker with the following values:

Quote:
const float HARD_LIGHT = 0.4; // 0.4 is good
Quote:
const float LIGHTNESS_GAMMA = 1.3
Retro-Nerd is offline  
Old 20 August 2013, 20:31   #9
FrodeSolheim
FS-UAE Developer

FrodeSolheim's Avatar
 
Join Date: Dec 2011
Location: Førde, Norway
Age: 38
Posts: 3,547
Hmm.. yes.. I now noticed that several test shaders were bundled with FS-UAE 2.3.4 by accident, some may even be embarrassingly bad and/or mis-named as I was experimenting a bit

Some of the test shades aren't all that bad. They have some nice features:
- scanlines are always aligned with screen pixels and not Amiga pixels. One would think this would be noticeable, but it isn't really... - The result is that scanlines look decent even with non-integer Amiga display scaling (i.e. it works quite well with autoscaling).
- variable scanline width depending on screen height (currently two different sizes, for ~720p screens and ~1080p screens).
- scanline intensity is done in HSL color mode, so the screen is not desatured due to scanlines - and some other color correction is experimented with as well.

I will have to clean this up though...
FrodeSolheim is offline  
 


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Scanline shader problem TysonJacobs support.WinUAE 3 26 July 2013 09:43
A1200 modifications demolition support.Hardware 7 30 October 2012 09:58
Clear Play It Loud Game Boy with modifications for music making Akira MarketPlace 0 21 September 2012 17:57
ADF modifications Twistin'Ghost Retrogaming General Discussion 1 04 March 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 00:07.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.
Page generated in 0.07100 seconds with 13 queries