Shaders for Max2D. Will it ever happen?

Miscellaneous Forums/General Discussion/Shaders for Max2D. Will it ever happen?

What's involved in getting Max2D to have shaders? I was browsing the net looking for 2D games and came across many that were using shaders in 2d.

What are the chances of Mark or Skid adding blitzwise pixelshaders etc. to Max2D?

What's involved in getting Max2D to have shaders?
How do you mean?

What are the chances of Mark or Skid adding blitzwise pixelshaders etc. to Max2D?
If I where a gambling man I'd say pretty good, but you'd have to wait for the 3D module.

Can't you do shaders now with Opengl?

I assume he's talking about some kind of high-level abstraction that'll work on DX aswell.

HI, What I mean is using shaders as easily as you would use LoadImage. Say for instance shaders of all kinds were added to Max2D and you could use/apply the effect by say doing: Shader(image,90). Something like that.

I know you can do them in OGL but a DX & OGL shader commandset like I mentioned would be great for adding extra effects to 2D games.

I apologise if I don't know what I'm talking about it's just that the 2D games I saw were using shaders and looked awesome and I don't know what's involved in adding support for shaders in Max2D using blitz syntax.

Highly unlikely. It would probably have to be done via the 3dModule, as FD said. It's certainly possible to have simple plug-in effects. Just take a look at HGE, which has a few simple shader effects. Cobra will apparently have a series of default shaders too, though not quite so plug and go.

Whether or not, BRL would go this way, I don't know. I suspect not though. I suspect they will provide an interface and leave it up to us to get the shaders working.

Yeah and DX7 never had shader support.

You can do vertex color and alpha with the updated version of my TPoly Module.

It's all up to what BRL provide with Max3D. If they provide a DX9 version of Max2D (for compatibility with Max3D - as you can't mix 3D commands from DX7 and DX9 at the same time), then if a shader 'abstraction' level is provided, it would be in a seperate module and you could use it with whatever you like, like the event module.

If they do that, then the lack of ImageBuffers -might- just be forgiveable, but I'd wager they'd come at around the same time too =]

What exactly are you imagining that you will be doing with a shader in two dimensions?

What exactly are you imagining that you will be doing with a shader in two dimensions?


What exactly do you think you *can't* do with a shader in two dimensions? Almost anything a shader can do is still possible in two dimensions. Some of the best shader stuff I've ever seen is in 2d. I remember a side-scrolling platform game with some of the most amazing visual effects I've ever seen.

What exactly are you imagining that you will be doing with a shader in two dimensions?
That's exactly what they said about Jazz Jackrabbit. A 2D side scrolling platform game that uses 3D hardware? Ludicrous.

They where ofcourse, wrong.

2 dimensions are for Pacman! Anything in less than 3 dimensions (the more the merrier, you see) is for people with only one eye!

What exactly do you think you *can't* do with a shader in two dimensions?
Great artwork.

Can't do that in three dimensions either.

Here is what you can do with 2d shaders:
http://www.facewound.com/tutorials/shader1/

It's also a tutorial. And that WIP game looks great too.

WOW thats cool

They also have a 2d water shader but they didn't give that in the examples. You can see it in the screenshots section of the game, it does look way cool.

Great artwork.


Whereas you clearly can do great artwork with a 3d shader. In retrospect, I don't know what I was thinking.

i saw a 2d space shooter with shader effects and whoaaa, crazy stuff!
Bullet rippling effects
Shockwaves on explosions
heat distortion effects

and more.

ApplyEffect(effectNumber,x,y,rotation,amplitude)

Now picture ApplyEffect tied in to a particle system of physics system.. endless possibilities!

i'm all for 2dShaders.

So, basically image processing then.

Reason I asked is because I'm not familiar with shaders can do or what you would particularly want to use them for in 2d.

So, basically image processing then.


Well it's a bit more than that. Essentially it's vertex processing and pixel processing. It can involve manipulating vertex positions, lighting, colors, UV's, etc as well as the colors of pixels. Character animation in 3d is done with vertex shaders, so you might use one to make your object wobble or deform in some way. Perhaps a star-trek beam me up effect.

So it's a pretty comprehensive list of things you can do, covering most of everything that's done on the videocard. The only real difference with doing it in shaders is that it's a lot faster to do these things in shaders if they're available in hardware.