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

Gaming and Consoles Forum

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

RJS (undefined) posted this on Saturday, 7th March 2015, 09:56

Not much. :( I got as far as compiling it then I ran out of free time.

Hopefully I can put aside some time in the next week to look at it again.

Editor
DVD REVIEWER
MYREVIEWER.COM

My Flickr Photostream

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

u-man (Mostly Harmless) posted this on Saturday, 7th March 2015, 14:39

yeah... thats still good news for me :)
i can only imagine, that it is not easy to do.... especially if you can look only in your freetime into it. sometimes there are other things more important like chilling, family etc.
dont hurry, didnt want to urge you.

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

RJS (undefined) posted this on Saturday, 7th March 2015, 18:59

I need a reminder every month. :)

Editor
DVD REVIEWER
MYREVIEWER.COM

My Flickr Photostream

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

u-man (Mostly Harmless) posted this on Thursday, 2nd April 2015, 15:02

Yeah :D ... your monthly reminder ;) .... and happy eastern

cheers u-man

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

RJS (undefined) posted this on Thursday, 2nd April 2015, 19:04

Happy Easter yourself. :)

Erm, not looked at it yet, but I did start a side project, a front end for MAME (and later other emulators).

Editor
DVD REVIEWER
MYREVIEWER.COM

My Flickr Photostream

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

u-man (Mostly Harmless) posted this on Thursday, 11th June 2015, 14:10

Hello again :)

Double bump, because 2 months passed since last post :D .
Maybe you allready noticed the big changes of HLSL in MAME version 0162. This was done with all the work of Jezze. He is the guy that I talked about in my earlier posts here. Now, where HLSL has greatly improved and I finished a 40 pages shader-guide, I want to go further with vector-simulation. I am still interested in your work and like i said, there is Jezze who has enough talent i guess, to continue your precious work.

Right now, i try to find a good solution for a point shader. I think, that a piont shader is really important and wanted to ask you, how you would approach to create one? I think of one that works globally on all vector games (arcade, vectrex etc.). The shader should be able to analyze the frame, especially the vector-lines / points, and put accordingly to the result, additional points to the final image. The only shader i found who did this, come from a smart-phone vectrex emulator. You can see a picture of it here: http://cdn.arstechnica.net/wp-content/uploads/2012/12/minestorm-in-game.jpg

If you zoom in, you can see the points more clearly. The picture may look ugly, but on the smartphone it looks pretty nice. Hope to hear you again and what you think about :D ,

cheers, u-man

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

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

I've made some progress, but again real life got in the way.

You can't fix the dots in a shader unfortunately, they have to be drawn as a sprite. The reason is related to how a vector monitor works, unlike a normal CRT which scans at regular speeds (and only turning off the beam during flybacks), a vector monitor turns the beam off, positions the X-Y deflections, then stops for a very small amount of time before turning the beam on again, once it's on it begins a timed graduated deflection to a new position, and then turns it off again.

A very expensive vector monitor would have had much tighter timing controls than those used in the arcades (and the Vectrex) so they wouldn't have spent as much time on the start of a line before the deflection to draw the line begins.

But since a vector arcade monitor is cheaper, you get a slight increase of brightness at the start of any line (but not at the end) caused by the delay in moving (the longer it stays in any one spot, the more excited the phosphors get).

The single dots are caused by the beam being turned on and then off after a period of time without moving it, and because of the timing of the circuitry this tends to be on longer than it should be and creates the nice glow that MAME doesn't emulate as it just treats it as a pixel.

Current WIP screenshot, I've got the code running again but I need to fix issues relating to the vectors being too dim, and I need to sort out the maths I'm using to generate the dot sprites.





Editor
DVD REVIEWER
MYREVIEWER.COM

My Flickr Photostream

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

RJS (undefined) posted this on Friday, 12th June 2015, 08:30

Oops, forgot to answer your note about 162, no I haven't noticed the changes, I should take a look. I just upgraded my arcade PC to a Q9550 Quad Core with a Geforce GTX 570 which I hope has enough grunt to handle HLSL now, the card I had before definitely did not!


Editor
DVD REVIEWER
MYREVIEWER.COM

My Flickr Photostream

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

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

Yeah... nice to see your progress and that was, what i meant with point-shading. Ok, must admit that i didnt realize that points are only on one end of a line, but you are right, just checked yesterday.

You should really look into v.0162, there where over 30 improvements, comparing to old HLSL. You want to remove the "dim", these settings could help (assuming you use v.0162) :

#
# BLOOM POST-PROCESSING OPTIONS
#
vector_bloom_scale 1.00
raster_bloom_scale 0.33
bloom_lvl0_weight 1.00
bloom_lvl1_weight 0.16
bloom_lvl2_weight 0.24
bloom_lvl3_weight 0.32
bloom_lvl4_weight 0.48
bloom_lvl5_weight 0.00
bloom_lvl6_weight 0.96
bloom_lvl7_weight 0.72
bloom_lvl8_weight 0.48
bloom_lvl9_weight 0.24
bloom_lvl10_weight 0.12

I also contacted Timothy Lotte, regarding the "point" shader and this is what he answered me:

It sounds like what you really need is an engine which renders pairs of
triangles representing a box around all the vector lines to draw all the
lines, and then uses some math in the pixel shader to compute the color
inside the line based on line size and position in the line. Then you can
easily do anything at the ends of the lines to represent the increased
brightness points, and do anything to get wide filtered lines.
Unfortunately this isn't something I have time to do myself right now, but
I could provide a few hints on what would be needed in the shader..

Might be a different approach, than doing it with sprites. Would your "sprite" solution work globally on all vector games? i.e. arcade, vectrex etc. ?

Also we want to add some slight jiggle to the vectors, what do you think about this? At least this could be done way more easier ;) .

Anyway, nice that you did not give up and i hope that we can find a way, to create some new stuff for vectors. If you have questions, feel free to ask. You are not alone outthere :D .

Have a nice weekend, u-man

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

RJS (undefined) posted this on Saturday, 13th June 2015, 11:43

Quote:
u-man says...
"Might be a different approach, than doing it with sprites. Would your "sprite" solution work globally on all vector games? "

Yes, because it's at the vector driver level.


Quote:
u-man says...
"Then you can easily do anything at the ends of the lines to represent the increased brightness points, and do anything to get wide filtered lines."

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.


Quote:
u-man says...
"Also we want to add some slight jiggle to the vectors, what do you think about this? "

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.


Quote:
u-man says...
"You are not alone outthere "

Good to know. :)


Editor
DVD REVIEWER
MYREVIEWER.COM

My Flickr Photostream

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