Open Surge Forum

A fun 2D retro platformer inspired by Sonic games and a game creation system

You are not logged in.

Announcement

Our community has moved to Discord! https://discord.gg/w8JqM7m

#1 2017-04-20 07:10:16

KZR
Member
Registered: 2010-07-14
Posts: 1,447
Website

[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


SD_sml.pngSeD_sml.pngLTot_W_sml.png
https://discord.gg/w8JqM7m ---> Open Surge's Discord server

Offline

#2 2017-04-20 13:59:49

Alexandre
Administrator
From: Brazil
Registered: 2009-01-27
Posts: 3,300
Website

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

hey, let us see some screenshots!

Offline

#3 2017-04-20 17:12:52

KZR
Member
Registered: 2010-07-14
Posts: 1,447
Website

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)


SD_sml.pngSeD_sml.pngLTot_W_sml.png
https://discord.gg/w8JqM7m ---> Open Surge's Discord server

Offline

#4 2017-04-21 02:09:55

Alexandre
Administrator
From: Brazil
Registered: 2009-01-27
Posts: 3,300
Website

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.

Offline

#5 2017-04-21 08:49:22

KZR
Member
Registered: 2010-07-14
Posts: 1,447
Website

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?


SD_sml.pngSeD_sml.pngLTot_W_sml.png
https://discord.gg/w8JqM7m ---> Open Surge's Discord server

Offline

#6 2017-04-21 13:32:58

Alexandre
Administrator
From: Brazil
Registered: 2009-01-27
Posts: 3,300
Website

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).

Offline

#7 2017-04-21 15:09:43

KZR
Member
Registered: 2010-07-14
Posts: 1,447
Website

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 ?


SD_sml.pngSeD_sml.pngLTot_W_sml.png
https://discord.gg/w8JqM7m ---> Open Surge's Discord server

Offline

#8 2017-04-22 13:24:53

Alexandre
Administrator
From: Brazil
Registered: 2009-01-27
Posts: 3,300
Website

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

You have to ask the developer about that.

Offline

Board footer

Powered by FluxBB  hosted by tuxfamily.org