Welcome to AEP Emulation Page - Emulation News
   
Hosting by: Uberspace.de   
Menu
· Home / News
· News Categories
· News Archiv
· Submit news

· My Account
· Search
· Forums
· Online Games
· Weblinks
· Game Reviews
· Translations
· Impressum

Downloads
 


Infos
· Museum
· Infocenter
· Das AEP Team
· Member Liste
· Top 25 Liste
· Glossar
· FAQ

Friends
· Emulation64
· 1Emulation.com
· Emu-France
· progetto-SNAPS


Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
JezzeOffline
Post subject:   PostPosted: Jun 19, 2013 - 12:28 AM
Banned Team Member


Joined: Oct 30, 2004
Posts: 5750



Highscores in 08/2019

Status: Offline
I found a nice off-screen of Pac-Man, that could be used as example to tweak the bloom settings.



From top to bottom:
- off-screen
- perspective corrected off-screen
- default MAME settings

_________________
Test your limits and break through! 
 
 
 View user's profile Visit poster's website ICQ Number 
Reply with quote Back to top
cmosesOffline
Post subject:   PostPosted: Jun 25, 2013 - 09:56 PM
Retrohling


Joined: Jun 12, 2013
Posts: 9



Highscores in 08/2019

Status: Offline
Jezze wrote:
I found a nice off-screen of Pac-Man, that could be used as example to tweak the bloom settings.



From top to bottom:
- off-screen
- perspective corrected off-screen
- default MAME settings


Tweaking the bloom settings needs to be done. They are too strong currently. There doesn't seem to be a lot of bloom in raster games. The bloom looks better in vector games.
 
 
 
 View user's profile Visit poster's website  
Reply with quote Back to top
JezzeOffline
Post subject:   PostPosted: Sep 21, 2013 - 05:34 PM
Banned Team Member


Joined: Oct 30, 2004
Posts: 5750



Highscores in 08/2019

Status: Offline
Ich habe meine modifizierte post.fx Shader Datei aktualisiert, so dass sie wieder mit MAME 0.150 kompatibel ist. Dabei habe ich auch gleich die simulierte Reflexion etwas überarbeitet, so dass sie nun leicht dezenter wirkt und von der Stärke der Bildschirmkrümmung und nicht wie zuvor von der Vignettierung anhängig ist.

Passende Grundeinstellungen - wie ich sie verwende - findet ihr hier und müssen an die entsprechende Stelle in der mame.ini kopiert werden. Ihr benötigt für diese Einstellungen noch die crt_shadow_mask.png.

_________________
Test your limits and break through! 
 
 
 View user's profile Visit poster's website ICQ Number 
Reply with quote Back to top
cmosesOffline
Post subject:   PostPosted: Jan 08, 2014 - 12:04 AM
Retrohling


Joined: Jun 12, 2013
Posts: 9



Highscores in 08/2019

Status: Offline
Jeeze,

I am using your post.fx and crt_shadow_mask.png files and really like the look. I had a few questions.

1. Is it possible to turn off the attributes like vignetting and reflection? I tried commenting them out, but only get a black screen followed by an error.

2. When playing games that are med resolution the like Popeye and Toobin' with the current settings there is a moire pattern that can be seen with the scan lines. I think this occurred before at one point.

Any chance of taking a look at it?

Thanks
 
 
 
 View user's profile Visit poster's website  
Reply with quote Back to top
JezzeOffline
Post subject:   PostPosted: Jan 08, 2014 - 08:15 PM
Banned Team Member


Joined: Oct 30, 2004
Posts: 5750



Highscores in 08/2019

Status: Offline
First of to prevent some confusion. The original post.fx shader uses the (image) pincushion parameter to calculate the screen curvature effect. But there is also a (screen) curvature parameter which does nothing in the original shader. So, I use this parameter to calculate the vignetting intensity and you can disable the vignetting separately by changing the (screen) curvature parameter to 0.

To calculate the reflection I use the (image) pincushion parameter and you can't disable the reflection without disabling the screen curvature effect. Actually, it would be the best to have a third parameter to calculate the reflection separately. But this can be only done by changing the source code of MAME.


You still can disable both completely, if you comment out the following lines in the post.fx shader.

line 201 for vignetting
//Output.rgb *= saturate(Vignette);

line 224 for reflection
//Output.rgb += (saturate(Reflection) + saturate(Spot)) * PincushionAmount;


I don't think the moire pattern can be avoided with the bi-linear texture filtering of MAME. The more close parallel lines like scan-lines the more you will see the moire pattern when the screen is curved.

The number of scan-lines depends on the resolution of the game. But you can reduce the number of scan-lines manually by reducing the value of the scanline (screen) size parameter from 1.0 to 0.5; halves the number of scan-lines.

_________________
Test your limits and break through! 
 
 
 View user's profile Visit poster's website ICQ Number 
Reply with quote Back to top
jelboOffline
Post subject:   PostPosted: Jan 15, 2014 - 08:52 PM
Retrohling


Joined: Jan 15, 2014
Posts: 1



Highscores in 08/2019

Status: Offline
Jezze, thanks for explaining the different shader options. I was wondering if it would be possible to use the HLSL code with the eFX framework, enabling the effects in basically every DirectX-outputting game or emulator.

I'm willing to put effort in this, but as of now I know too little of HLSL, GLSL and that stuff to even begin. Could you please have a quick look at eFX?
 
 
 
 View user's profile  
Reply with quote Back to top
JezzeOffline
Post subject:   PostPosted: Jan 18, 2014 - 12:33 PM
Banned Team Member


Joined: Oct 30, 2004
Posts: 5750



Highscores in 08/2019

Status: Offline
I had a quick look into the framework and it should be possible to use the MAME shader without major changes. But I'm not quite sure how to pass some of the required parameters through the framework to the shader, e.g. the resolution of the game. The documentation is not very detailed and lacks more complex examples.

_________________
Test your limits and break through! 
 
 
 View user's profile Visit poster's website ICQ Number 
Reply with quote Back to top
cmosesOffline
Post subject:   PostPosted: Feb 05, 2014 - 05:42 PM
Retrohling


Joined: Jun 12, 2013
Posts: 9



Highscores in 08/2019

Status: Offline
Jezze,

I had a couple of questions about your latest settings. I noticed some changes from your original settings and was hoping you could explain them.

shadow_mask_alpha - original setting 0.075, latest setting 0.25 - a big jump in shadow mask, much darker now, just a preference change?
curvature - original setting 0.15, latest setting 0.25 - this is the setting for vignetting, just decided to go darker?
pincushion - original setting 0.30, latest setting 0.0 - this is the screen curvature, set at 0 there is none, was this a mistake, should it be 0.30?

I also have a question regarding your shadow_mask_x_count and shadow_mask_y_count. Originally I was using the crt_slot_mask.png file so the settings for both of those was -2 with shadow_mask_usize and shadow_mask_vsize both at 0.375. I started using the crt_shadow_mask.png file but didn't realize you have different settings for them. When I use the with the slot_mask settings I think they look better. Your settings for crt_shadow_mask.png are -3 and -2 for the mask count and 0.375 and 0.250 for the usize and vsize. Since the pngs are the same size 48x48 pixels, why are there different settings for them?

Hope that makes sense. Let me know if I can explain anything better.

Thanks
 
 
 
 View user's profile Visit poster's website  
Reply with quote Back to top
JezzeOffline
Post subject:   PostPosted: Feb 05, 2014 - 08:37 PM
Banned Team Member


Joined: Oct 30, 2004
Posts: 5750



Highscores in 08/2019

Status: Offline
My latest configuration is linked in this post and the changes are only my current preferences.

shadow_mask_alpha - 0.15 is just double, because the shadow mask was barely seen with 0.075.

The values of curvature and pincushion have been interchanged because I also changed the usage in the shader to prevent the possible confusion, I mentioned earlier. So curvature - 0.15 is now used to configure the screen curvature and also the light reflection; and pincushion - 0.30 is now used for the vignetting.

Quote:
shadow_mask_x_count and shadow_mask_y_count
shadow_mask_usize and shadow_mask_vsize

Yeah, these configurations can be difficult to understand. But u/v-size and x/y-count have to match each other to get a "perfect" result.

First, lets explain the u/v-size. DirectX always uses textures of the size power-of-two, e.g. 2x2, 4x4, 8x8 etc. The next power-of-two size from 48x48 is 64x64.

If you look at the following slot mask texture you see a solid and dashed area.



The solid area (12x12) represents 1 pixel of the monitor and the dashed area (24x24) represents 2x2 pixel. We have to use the dashed area in order to simulate the slot mask, because the second pixel column has an offset of a half pixel in y-direction. These 24x24 pixel can be perfectly tiled to get a slot mask as large as you want.

To calculate the size of the dashed area of 24x24 pixel in u/v-coordinates (which are in a range from 0 to 1) you have to remember that DirectX uses a power-of-two textures size. So the size of your texture of 48x48 becomes 64x64.

24 / 64 = 0.375. This is our u/v-size.

Now you have to specify how often you want to tile the 24x24 texture part over the whole game resolution. If you know the resolution of the game is for example 320x240 pixel, you can set the x-count to 160 and the y-count to 120; the half resolution because our 24x24 texture part represents 2x2 pixel. But these settings have to be changed for each other game with different resolution. So I changed the shader to specify how many pixel the texture part represents, by using negative values for x/y-count.

If you now look at the texture of the shadow mask, you can see why I used a different u/v-size and x/y-count.



The solid area (8x8) represents 1 pixel and the dashed area (24x16) represents 3x2 pixel.

24 / 64 = 0.375 u-size
16 / 64 = 0.25 v-size

In this example 0.375 for both u-size and v-size also works. As you can see here, the dashed area (24x24) then represents 3x3 pixel.



If you use a wrong u/v-size, something like this will happen, if you would zoom into the mask.


(left good, right bad)

I hope I've cleared up more questions than I have raised. Wink

_________________
Test your limits and break through! 
 
 
 View user's profile Visit poster's website ICQ Number 
Reply with quote Back to top
cmosesOffline
Post subject:   PostPosted: Feb 10, 2014 - 03:11 PM
Retrohling


Joined: Jun 12, 2013
Posts: 9



Highscores in 08/2019

Status: Offline
Jezze,

Thanks and yes it did clear things up. I understand the reasoning behind the different settings for u/size and v/size. I think I was using an older version of your post.fx shader. I now have the current one and your current settings. I think they look very good and authentic. My preferences would be to be a little lighter and also show a more scanlines. I was doing some experimenting and it seems that something is not correct with the scan lines. When I make them darker, they have a pattern to them. There seems to be a row that is blurry mixed in with the correct lines. I thought it might have to do with your scanline_height being 1.5, but changing that did not make any difference. I also reduced your scanline_bright_offset as I know that can sometimes change the way they look. I was still getting the same result, every so many lines there was one that was blurry. I wanted to know if you had any thoughts on that issue.

In your post above, the last picture you show with the zoomed in mask images, was that a screenshot with MAME and HLSL or is that a real shadow mask? If it is from MAME with HLSL, an you tell me how you created it?

Thanks
 
 
 
 View user's profile Visit poster's website  
Reply with quote Back to top
JezzeOffline
Post subject:   PostPosted: Feb 16, 2014 - 11:33 AM
Banned Team Member


Joined: Oct 30, 2004
Posts: 5750



Highscores in 08/2019

Status: Offline
The last image in my previous post was created with MAME. I set a very low shadow_mask_x/y_count like 5, which tiles the shadow mask only 5 times.

Quote:
I wanted to know if you had any thoughts on that issue.

I don't think it's an issue with the shader, I think it's caused by the downscaling of the rendered image to your monitor resolution.

Could you create a screen-shot with Alt+12 and look if the problem can be seen there as well? This will create 4 images, one for each quadrant of your monitor. You can specify the resolution of this screen-shot in your mame.ini with hlsl_snap_width/height.

_________________
Test your limits and break through! 
 
 
 View user's profile Visit poster's website ICQ Number 
Reply with quote Back to top
cmosesOffline
Post subject:   PostPosted: Feb 19, 2014 - 04:37 PM
Retrohling


Joined: Jun 12, 2013
Posts: 9



Highscores in 08/2019

Status: Offline
Jezze,

You are correct, it is not the shader. It is the hlsl_prescale_x and hlsl_prescale_y settings mostly. When I run Metal Slug at hlsl_prescale of 2 there is some moire issues and every 4th or 5th scanline looks a little blurry. When I run Metal Slug at hlsl_prescale of 3 the moire and scanline issue is greatly reduced, pretty much completely gone. There is still the faintest bit but that can also be reduced by turning down the rasterbloom, but is not really necessary. I played around with this with a few games and they vary a little by game resolution. Some look better as hlsl_prescale 2, some look better at 3. If you set it to 0 or auto they look good, but this sometimes slows down the performance some.

Thanks for your assistance. I think your settings look really good.
 
 
 
 View user's profile Visit poster's website  
Reply with quote Back to top
FreneticGeekOffline
Post subject:   PostPosted: Sep 26, 2014 - 02:29 PM
Retrohling


Joined: Jul 10, 2012
Posts: 2



Highscores in 08/2019

Status: Offline
Here is a cool picture of my efforts to implement your amazing shader plus the hlsl.ini settings.



Thank you very much. Very Happy
 
 
 
 View user's profile Visit poster's website  
Reply with quote Back to top
Retro-NerdOffline
Post subject:   PostPosted: Jun 27, 2015 - 04:54 PM
Retrokenner


Joined: Jul 02, 2006
Posts: 509



Highscores in 08/2019

Status: Offline
In aktuellen MAME Versionen (nutze immer die PLUS Variante) geht HLSL überhaupt nicht mehr. Gibt nur noch einen schwarzen Bildschirm. Ohne geht es einwandrei. Weiß da einer mehr, warum das derzeit nicht geht? Ein .ini Problem? In v0.158 gings noch, hatte dann einen Sprung auf die aktuelle v0.163 gemacht.
 
 
 
 View user's profile Visit poster's website  
Reply with quote Back to top
JezzeOffline
Post subject:   PostPosted: Jul 02, 2015 - 12:30 PM
Banned Team Member


Joined: Oct 30, 2004
Posts: 5750



Highscores in 08/2019

Status: Offline
Mit 0.162 gab es massive Änderungen am Shader Code. Falls du beim Umstieg auf 0.163 nur die .exe von MAME ersetzt hast, musst du noch das HLSL Verzeichnis austauschen und auch die Artworks.

_________________
Test your limits and break through! 
 
 
 View user's profile Visit poster's website ICQ Number 
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT + 1 Hour
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © The PNphpBB Group
Credits
All logos and trademarks in this site are property of their respective owner. The comments are property of their posters, all the rest © 1998 - 2018 AEP Emulation Page.
You can syndicate our news via RSS using the file rss_en.xml for English headlines and rss_de.xml for German headlines.