10 February 2013, 12:11 | #21 |
FS-UAE Developer
Join Date: Dec 2011
Location: Førde, Norway
Age: 43
Posts: 4,043
|
I've created another thread: "UAE Scripting Layer" (http://eab.abime.net/showthread.php?t=67805) for further ideas / discussion about a general Lua scripting layer and API
|
11 February 2013, 18:47 | #22 |
FS-UAE Developer
Join Date: Dec 2011
Location: Førde, Norway
Age: 43
Posts: 4,043
|
@mr_a500: Hi, if you download the latest code from the git repo and build FS-UAE, you can have the feature you wanted (more or less) -but you need to "create it" yourself
Create a theme folder and put the following script in theme.lua (for example Documents/FS-UAE/Themes/ScanlineTheme/theme.lua): Code:
bplcon0 = 0 function on_uae_vsync() bplcon0 = uae_peek_u16(BPLCON0) end function on_fs_emu_init_video() lowres_shader = fs_emu_load_shader("scanlines-nonlinear-blur") highres_interlaced_shader = fs_emu_load_shader("scanlines-classic") end function on_fs_emu_render_frame() if bit32.band(bplcon0, 0x8004) == 0x8004 then fs_emu_set_shader(highres_interlaced_shader) else fs_emu_set_shader(lowres_shader) end end * Remember to activate the theme (for example using option theme = ScanlineTheme) * Remember to disable the scanline option, you don't want to double up on the scanlines... * This won't work perfectly in all situations, but it will work well in many cases. * The blpcon0 value stored by on_uae_vsync may not correspond to the correct frame due to threading when accessed in on_fs_emu_render_frame. This is not really a big problem here, but it will be possible to associate variables with specific frames later. * Also, the script API is not frozen yet, so the script may need to be updated in the future. Last edited by FrodeSolheim; 11 February 2013 at 19:00. |
11 February 2013, 21:26 | #23 |
Amiga-based Cyborg
Join Date: Dec 2004
Location: Canada
Posts: 808
|
It looks like you have an undeclared variable:
Code:
src/emu/scanlines.c:57: error: ‘src2’ undeclared (first use in this function) I did everything you listed above, but when I run FS-UAE, I get: FAILED TO COMPILE FRAGMENT SHADER NO SHADER PASSES LOADED FAILED TO COMPILE FRAGMENT SHADER NO SHADER PASSES LOADED |
11 February 2013, 21:31 | #24 |
FS-UAE Developer
Join Date: Dec 2011
Location: Førde, Norway
Age: 43
Posts: 4,043
|
The line src2++ must be deleted. I missed that one when cleaning up some code (in a section only compiled on PPC/bigendian architectures).
It's possible you don't have an sufficiently recent OpenGL GPU to run shaders. Please check FS-UAE.log for shader log. Last edited by FrodeSolheim; 11 February 2013 at 21:37. |
11 February 2013, 21:40 | #25 |
Amiga-based Cyborg
Join Date: Dec 2004
Location: Canada
Posts: 808
|
Here's part of the FS-UAE log:
Code:
fs_emu_xml_shader_init checking shader scanlines-nonlinear-blur checking shader (share)/shaders/scanlines-nonlinear-blur.shader fs_get_application_exe_path compiled vertex shader successfully WARNING: failed to compile fragment shader WARNING: no shader passes loaded done loading shader checking shader scanlines-classic checking shader (share)/shaders/scanlines-classic.shader fs_get_application_exe_path compiled vertex shader successfully WARNING: failed to compile fragment shader WARNING: no shader passes loaded done loading shader |
11 February 2013, 21:57 | #26 |
Amiga-based Cyborg
Join Date: Dec 2004
Location: Canada
Posts: 808
|
I checked and it seems this card has limited fragment shader support. ("Damn you, ATI." ...shaking fist in air)
Instead of reworking the shader to get it to work on my old card (though it was kick-ass back in 2004 ), I think the best solution is for me to just use the old scanlines. |
11 February 2013, 22:01 | #27 |
FS-UAE Developer
Join Date: Dec 2011
Location: Førde, Norway
Age: 43
Posts: 4,043
|
OK -I should write the shader compiler log to the log file though, I see that I don't do this currently (it's quite possible that the shader can be rewritten to be more compatible with older cards, compilation errors will be useful).
|
21 February 2013, 16:45 | #28 |
Old fart
|
I cant get this to work, does it work with Intel HD 3000 card?
I cant get to work any theme at all actually. I have two themes, scanlinetheme and 1084x_night_wall_wood in custom configuration. In # Custom Configuration Options i have theme = 1084x_night_wall_wood If i add also under it second theme, it gets deleted when i save it If i add it to # Custom Settings, second theme stays but when i Start this configuration none of these themes are shown. |
21 February 2013, 16:49 | #29 |
FS-UAE Developer
Join Date: Dec 2011
Location: Førde, Norway
Age: 43
Posts: 4,043
|
Hi spajdr, impossible to comment the problem without more information. Please FS-UAE.log after having enabled a theme.
(Also, you cannot add two themes at the same time, so only one of the config lines will be kept. When you use both custom options and custom settings, values in custom options (specific to configuration) overrides custom settings (global)). |
21 February 2013, 17:16 | #30 |
Old fart
|
allrighty, here is the log file.
|
21 February 2013, 17:23 | #31 |
FS-UAE Developer
Join Date: Dec 2011
Location: Førde, Norway
Age: 43
Posts: 4,043
|
@spajdr: The problem with this one is that the Lua support was not added until 2.1.27 (available here http://eab.abime.net/showthread.php?p=867244).
Regarding the problem with 1084x_night_wall_wood, I need FS-UAE.log for that case too. It seems the previous log file you posted was not complete. Please make sure you quit FS-UAE before uploading the log file, or the log may not be flushed. |
21 February 2013, 17:28 | #32 |
Old fart
|
Second theme is not important, since if i cant use two at once, i want at least get these scanlines to work.
I updated to v27 but scanlines still not showing. |
21 February 2013, 18:08 | #33 |
FS-UAE Developer
Join Date: Dec 2011
Location: Førde, Norway
Age: 43
Posts: 4,043
|
OK, I see the problem. While Lua itself was added in 2.1.27, the code necessary for the above theme.lua to work was added later ("Hi, if you download the latest code from the git repo and build FS-UAE"..., dated Feb. 11 - 2.1.27 is from Feb. 9).
But if you simply want scanlines, just use the option "scanlines = 1" with the 2.1.27 version. (In 2.1.28, the scanlines option will revert to the former simpler/faster scanline implementation, and the new-style scanlines are available as a shader instead). |
22 February 2013, 09:51 | #34 | |
Old fart
|
Quote:
|
|
22 February 2013, 11:22 | #35 |
Old fart
|
Frode if i may ask, how i can use shader files under shaders directory?
Thanks spajdr |
22 February 2013, 22:13 | #36 | |
FS-UAE Developer
Join Date: Dec 2011
Location: Førde, Norway
Age: 43
Posts: 4,043
|
Quote:
|
|
22 February 2013, 22:42 | #37 |
Registered User
Join Date: Feb 2012
Location: United Kingdom
Posts: 3,186
|
Hey Frodo! I can't believe I missed this! The scanline implementation is pretty sweet! I think next time we play, it'll be using the scanline! :P
|
25 February 2013, 12:13 | #38 |
Registered User
Join Date: Dec 2012
Location: Finland
Posts: 162
|
Hi,
New shader-based scanline renderer does not work on my Intel HD Graphics 3000 laptop. Is there something special it requires? |
25 February 2013, 12:30 | #39 | |
Old fart
|
Quote:
Attach file fs-uae.log.txt from FS-UAE\Logs directory |
|
25 February 2013, 12:43 | #40 |
Old fart
|
By the way, is it possible to combine two shaders into one file, like scanline classic + curvature?
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Scanline modifications wanted | Retro-Nerd | support.FS-UAE | 8 | 20 August 2013 20:31 |
Scanline shader problem | TysonJacobs | support.WinUAE | 3 | 26 July 2013 09:43 |
Playing around with RGB/Scanline-Effect | lomaxx | Nostalgia & memories | 13 | 23 July 2009 14:08 |
Scanline option request | Christian | request.UAE Wishlist | 3 | 26 May 2009 22:24 |
REQ : Vistapro (Landscape Renderer) | Djay | request.Apps | 22 | 01 May 2002 22:47 |
|
|