Page 3 of Vector games.... Vector shader? WTF???

Gaming and Consoles Forum

RE: Vector games.... Vector shader? WTF???

u-man (Mostly Harmless) posted this on Saturday, 13th June 2015, 14:16

I didnt know of a global vector driver... noob as I am :) , so this is some kind of a vector-renderer that MAME use, i guess. This are very good news, as MAME and MESS have merged in v0162. I always thought, vectors would be treated independently for every system/console.

Quote:
Rob Shepherd says...
The vector display driver uses line primitives to draw lines, so already has options for increasing the thickness. Also there is no way that I can see in which a post-processing filter could determine which is the start and which is the end of a line.

So it has to be sprites.
Sounds very logical to me . I think with "thickness", Timothy meant something like the current vector_length_ratio and not the overall thickness of lines, but you are right, there would still be the problem with the start/end of a line. No problem at all with sprites, as long as they dont look like the ones in the old AAE-Emulator.

Quote:
Rob Shepherd says...
"That's an interesting idea, the Vectrex has a terrible cheap vector monitor in it which jiggles a lot. Should be easy to add, I can do that once I get it working in the newer MAME cores and looking how it did in the previous one."

That would be awesome. Some people and friends told me, that even with original arcade hardware, some jiggle could appear, depending on the condition of a cab, chassis, tube  etc.

I think these two things alone (point-shader, jiggle), would be great additions to vector based games.

Quote:
Rob Shepherd says...
""You are not alone outthere ""
Sounds like X-Files, but its true ^^. If you need something special on the HLSL side to get your work done, let me know it.

PS: your posted picture looks really nice... a little glow and it would be perfect.

This item was edited on Saturday, 13th June 2015, 15:23

RE: Vector games.... Vector shader? WTF???

u-man (Mostly Harmless) posted this on Friday, 26th June 2015, 10:57

Hello Rob Shepherd,

i may need your help, as i am writing a shader manual at the moment and i am not 100% sure, if i am right with some of my definitions regarding the vector options and vector games. You seem to be the right person for me to ask, how those games "really" work.

I just copied the text that needs your expert look:

#
# VECTOR POST-PROCESSING OPTIONS
#
vector_length_scale 0.8
vector_length_ratio 40.0

vector_length_scale (0.00-1.00)

determines how much length affects vector fade.

vector_length_ratio (0.000 – 1000.000)

affects the vector fade length (4.0 - vectors fade the most at and above 4 pixels, etc.)

"These two parameters will likely look different on nearly all vector-based games, as they depend on the size of the presented vector-objects and if it is a “true” 3D game or if it is a 2D based game. The parameters makes the most sense on 3D based games and are creating a “more depth” effect for vectors that are aligned on a Z-axis.

To fully understand them, I recommend a game like Speed Freak.

However there are still some 2D games like Asteroids for example, that also use vectors on the Z-Axis, even if it is a 2D game. A good example for this, is the score table on the top of the Asteroids screen. The left and right player scores appear darker than the middle hiscore, which shines brighter, even if they are nearly the same in size.

Then there is the vector beam itself, which draw i.e. bigger asteroids darker, because they are drawn more far away from the viewers POV. Smaller asteroids or objects like the small ufo, are drawn much brighter, as the beam is to close to adjacent vectors to make a fade visible. Most presets I have seen, does not consider this fact, resulting in “wrong and equally bright” vectors in game appearance."

Any help on this would be nice.
Many thanks in advance, u-man

This item was edited on Friday, 26th June 2015, 12:00

RE: Vector games.... Vector shader? WTF???

RJS (undefined) posted this on Sunday, 28th June 2015, 08:28

3D/2D has nothing to do with it, vectors are all 2D objects, I'm not sure what you mean about vectors drawing in a Z-Axis. I think you might be misunderstanding how the technology works. :/

There are a few reasons why one vector object may be darker than another. It can be because the timing circuitry is unable to move the beam at a constant velocity when drawing long lines compared to short lines, or it can be because the driver allows the current of the electron beam to be varied.

If MAME is drawing all asteroids the same brightness, then any variation a real machine shows in brightness between them is purely down to the resolution of the timing circuitry.

A normal CRT monitor has a fixed scanning period, so (unless its faulty) any variation in brightness on a line is down to the image signal. I'm not overly familiar with the exact circuitry in a vector monitor but the driver for the beam will have to take a list of X-Y coords and move the beam smoothly between them at a constant rate, which is going to have variations based on that distance.

Quite what those variations are, will be down to the monitor hardware itself.

Also, for a shader filter, you cannot simulate vector fade with it convincingly. Unless you are updating the display a magnitude or more faster than the refresh rate. Is that what you are trying to achieve?

Basically, the MAME vector driver itself has to handle simulating flicker, the dots at the start of lines, the brightness of lines, single dots being brighter than lines, flyback lines, etc.

The only thing you can do in a post-processing shader, is the glow and phosphor fading. I don't think the latter is very important for anyone who wants to simulate a good quality vector display, it's useful for those who want to simulate an ageing one, but beyond that it's not useful at all.

The glow however is very important, it's small but definitely apparent on all monitors, and on any arcade machine which had a colour overlay, it's even more exaggerated.

Editor
DVD REVIEWER
MYREVIEWER.COM

My Flickr Photostream

RE: Vector games.... Vector shader? WTF???

u-man (Mostly Harmless) posted this on Sunday, 28th June 2015, 14:04

First, big thanks for reply and yes, maybe i didnt fully understand the technology behind a vector-tube, thats why i asked you :D , before releasing a guide that everyone will laugh at ;) .

I dont know if those parameters are a post.fx, they are the ones in current MAME distributions, i just need to explain them properly and that was my try to do it. If you take Asteroids as a example, there are things you can observe, like the things I allready explained. The hiscore table on top of the screen for example, where left and right player-score is darker than the mid hiscore. Or all smaller objects in Asteroids, like the smaller rocks, ufos and bullets. I heard from a friend, that brightness is defined by the Z-axis, which sound logical to me, but i dont have any info that can confirm this assumption. It sound plausible, because if i compare 3D-programs or tools, that work with vectors, then all of them also use the Z-Axis. Off course Asteroids is a 2D game, but maybe it uses such a process to achieve that different gradients in color or better B/W said. Bad thing is, i can only observe some games, usually Asteroids and BattleZone and the next date to see them in action is September :( .

The main thing, why I am doing this, is to explain to people, that most presets i have seen are wrong, because everything on the screen is equally bright, which for sure is not right. Most people prefer the AAE emulator, because it has nice glows, but its still not the right representation of the games, because its way to overextended and dont include all the aspects that we talked about here.

My biggest hopes lies in your code which looks very promising (even Jezze said, that your stuff looks nice). Please dont give up your nice work so far.

Greets u-man

RE: Vector games.... Vector shader? WTF???

u-man (Mostly Harmless) posted this on Tuesday, 20th October 2015, 09:44

Hello Rob,

long time no hear ;) , but i have some good news for you. Jezze brought back HLSL to vector-games. He improved HLSL with over 1300 lines of code, fixing many things and even introducing new parameters. This means you can use any of the HLSL parameters also on vector games: like having a shadowmask for colored vector games, using defocus, RGB gamma, floor parameters on vector games and the new bloom overdrive parameter (this effect allows to overdrive pure colors like red, green and blue to become more brighter).

You can download the latest MAME changes from Jezze here:
https://www.dropbox.com/s/yt0onktgeniaedk/mame64-hlsl-wip_v01.7z?dl=0

I included a StarWars and Asteroids .ini ( paths need to be changed accordingly) with maybe a little exaggerated settings, but they are showing nicely the points, stars, bullets and still keeping the sharpness. I found the defocus and RGB gamma values very useful, to have large beamwidth settings, but keeping the lines still thin. As a result, you have big enough points. Feel free to experiment and maybe give some feedback.

I think that the limit is reached, with what could be done with HLSL or shaders alone. Everything what can be improved now, is left to the vector renderer alone.

I started a thread with many useful infos here: http://forums.bannister.org/ubbthreads.php?ubb=showflat&Number=102065&page=1

which in turn lead to better documentation, to what is needed for further improving: https://github.com/mamedev/mame/issues/399

I have two ideas for the vector renderer, that may be interesting for you:

- a shake/jiggle filter that operate on vertices level, to simulate the "stable" screen of vector games, especially true for the Vectrex system and the cheap hardware used (comparing to arcade vector games).

- due to the nature of the vector renderer, assuming that everything being drawn is a line, a filter would be needed, that treats "true" points (i.e. Stars, Bullets etc) like a special case. So that a point case could be passed to exclusive point fx, like bloom/glow, shading etc.

If you read my thread link above, you will see what the problem is, with the vector renderer and points in vector games. I have the hope, that you could help/contribute something for this task. That would be just awesome.

Thx for reading, u-man

RE: Vector games.... Vector shader? WTF???

RJS (undefined) posted this on Tuesday, 20th October 2015, 16:51

That's great news, I'll try to find the time (RSI playing up a bit atm limiting my coding to work only :() to digest the links you posted, I've read Moogley's git hub issue and it sums up a lot of the issues.

I like your idea of a jiggle filter too, Vectrex really is awful at reliable sweeping. :)

Editor
DVD REVIEWER
MYREVIEWER.COM

My Flickr Photostream

Go back to Gaming and Consoles Forum threads, or All Forum threads