Topic: [RANDOM EXPERIMENT] Shader Effects in Open Surge (!!)

As some of us know, Open Surge does not support hardware acceleration of any kind.

A few days ago, I was researching wrappers of old graphical APIs and found out that the latest versions of DGVoodoo can wrap DDraw into OpenGL and Direct3D!

Well, this is a wrapper, meaning all functions are emulated and therefore performance suffers a bit. But it worked!

So I went a step further and started toying with ReShade to add some Shader effects. And it worked!! But it was sluggish, veeeeery slow.

It was still interesting, though. Some shaders don't do anything at all because Open Surge renders in 2D, so things that need a depth buffer won't work. But color correction, HQ4x and things that affect the screen rather than individual elements are bound to work.

Not really useful per se, but it was fun, and let me wondering what a world of possibilities an engine based on a modern graphical API could offer smile

https://image.ibb.co/kuSYrm/SD_sml.pnghttps://image.ibb.co/kHq8P6/SeD_sml.pnghttps://image.ibb.co/cJf8P6/LTot_W_sml.png

Re: [RANDOM EXPERIMENT] Shader Effects in Open Surge (!!)

hey, let us see some screenshots!

Re: [RANDOM EXPERIMENT] Shader Effects in Open Surge (!!)

After some more tweaking, I managed to virtually eliminate performance issues. of course, too many shaders at once and computer goes kaboom, but still, fun to toy with big_smile

here, knock yourself out cool

https://drive.google.com/open?id=0B_G9c … G8wTThqT1E

EDIT: Image removed (Link expired) Follow link above for full gallery

Last edited by KZR (2017-04-21 08:47:30)

https://image.ibb.co/kuSYrm/SD_sml.pnghttps://image.ibb.co/kHq8P6/SeD_sml.pnghttps://image.ibb.co/cJf8P6/LTot_W_sml.png

Re: [RANDOM EXPERIMENT] Shader Effects in Open Surge (!!)

man, that's really cool.

One of the things you could try, if it suits you, is to replace the rendering routines by accelerated ones on core/video.c and core/image.c. While accelerated routines don't get implemented officially, perhaps you could maintain your own parallel build of the engine, thus benefiting everybody. We could give you support.

Re: [RANDOM EXPERIMENT] Shader Effects in Open Surge (!!)

Sounds great, although I have no idea how to do it. If you can aid me through that's great. I'll set up my compiling environment. Meanwhile, how do I get started with replacing the routines?

https://image.ibb.co/kuSYrm/SD_sml.pnghttps://image.ibb.co/kHq8P6/SeD_sml.pnghttps://image.ibb.co/cJf8P6/LTot_W_sml.png

Re: [RANDOM EXPERIMENT] Shader Effects in Open Surge (!!)

KZR wrote:

Meanwhile, how do I get started with replacing the routines?

Well, that's the challenge.

You'd need to know C and the graphical API of your preference. I don't know which graphical API you would use, so you'd need to study that. If you decide to do it, I can guide you through the specific routines of Open Surge (what they do, and so on). Then you could replace the graphics module and let Allegro do the rest (input, and so on).

Re: [RANDOM EXPERIMENT] Shader Effects in Open Surge (!!)

That sounds tempting, although a bit too much for me at the moment. as you know graphics and sound are my main areas. learning C plus a graphical API would be too much to tackle. Perhaps after I'm done with the release of Drift (over) Drive I'll come back to Open Surge with the intent to not only make a game with it, but also to further improve the engine.

did you ever get to understand how Paintown managed to mix Allegro 4 and 5 ?

https://image.ibb.co/kuSYrm/SD_sml.pnghttps://image.ibb.co/kHq8P6/SeD_sml.pnghttps://image.ibb.co/cJf8P6/LTot_W_sml.png

Re: [RANDOM EXPERIMENT] Shader Effects in Open Surge (!!)

You have to ask the developer about that.